Clicky

I am working a project, a website that runs off of a template managed application web-server called Roxen It is all XML template based and runs all the site through its own XML parser.  So i need to know how to script the HTML l and JAVASCRIPT to properly make it through the Roxen XML parser so i can get the JAVASCRIPT and HTML to the client side for proper browser parsing.  I believe document.write might work. I am not positive, please assist with proper direction for proper script commenting to properly render the needed code through the XML parser. i hope i make sense :)

asked 12/05/2011 11:52

greger14's gravatar image

greger14 ♦♦


15 Answers:
link

answered 2011-12-05 at 20:12:53

baretree's gravatar image

baretree

yes i found the Roxen extra-net site as well, fortunately i did take an xml class but that was years ago. and with the changes in HTML, XML, browsers and all the standards, i was just curious if there were any advanced standards i could follow ... which you provided, i will research and re-post my code tomorrow AM thanks much -Greg
link

answered 2011-12-05 at 20:14:03

greger14's gravatar image

greger14

<header name="Content-Type" value="application/xjavascript"/>
<insert file="/roxen-files/cms-templates/cmsfckconfig.
js"/>
<?noparse
...your custom JavaScript code here...
?>


   from your link to extranet roxen:

https://extranet.roxen.com/support/docs/5.1/roxen/5.1/pdf/cms/web-developer/web-developer.pdf

thank you hey just out of curiosity which search engines do you use. just curious thanks


link

answered 2011-12-05 at 20:17:15

greger14's gravatar image

greger14

Here is what i am using, getting a clickable slideshow to work in an xml parsed index.xml file.
the thing is, when i save just the code i am about to post below as an html it works fine and opens the links in a new window. when i add the same code to a <?noparse ... ?> tag, the javascript runs except the slidelink function it just opens up as the target being the function that is supposed to rotate the links with the images ....

<?noparse



 
<script type="text/javascript">
<!--
var image1=new Image()
image1.src="images/Slide01.jpg"
var image2=new Image()
image2.src="images/Slide02.jpg"
var image3=new Image()
image3.src="images/Slide03.jpg"
-->
</script>
<a href="javascript:slidelink()" target="_blank">
<img src="images/Slide01.jpg" name="slide" id="slide" border="0" width="780" height="205" /></a>
<script type="text/javascript">
<!--
var step=1
var whichimage=1
function slideit(){
if (!document.images)
return
document.images.slide.src=eval
("image"+step+".src")
whichimage=step
if (step<3)
step++
else
step=1
setTimeout("slideit()",1800)
}
slideit()
function slidelink(){
if (whichimage==1)
window.location="http://www.yahoo.com"
else if (whichimage==2)
window.location="http://www.google.com"
else if (whichimage==3)
window.location="link3.htm"
}
-->
</script>
?>


It works just points to teh javascript function not the actual link, is ther a fix or a work around?
link

answered 2011-12-05 at 20:34:10

greger14's gravatar image

greger14

anyone :)
link

answered 2011-12-06 at 18:11:05

greger14's gravatar image

greger14

tryout that by putting alerts(" in line by lene code so you have an idea exctly where the javascript get broken


function slidelink(){
alert("Inside Functio:");
if (whichimage==1)
alert("step1:");window.location="http://www.yahoo.com"
else if (whichimage==2)
alert("step2:");window.location="http://www.google.com"
else if (whichimage==3)
alert("step3:");window.location="link3.htm"
}


if that works fine try to put

alert("Step:"+whichimage)

REason:

while you use <?noparse you will not get special character visual display for some text so it might be the case something goes wrong due to that
link

answered 2011-12-07 at 05:28:20

keyu's gravatar image

keyu

i will give it a try just wondering if there was a work around or anything special like double quoting those 'special characters that might help it get passed along? like the < > or ? I know these are special to the xml parser and it says these might cause issues. but i thought he noparse would keep anything in the noparse from being rendered.

My goal is to use a clickable slideshow. anything basic and easy. so i am even looking for something dhtml based possibly i tried a handfull last night and the issue i was having was they all work ... but only half way, some would load but not rotate, some would rotate but not switch links, its the Roxen webserver thats making this whole thing a headache. I even have a div menu that shows up until i publish my work then the active page doesnt show my menu :(
The more i look the more i find that people have lost sight of KISS
Keep It Simple Stupid :) somethings gotta give right. I won't be able to try it till later. I am looking up any chance of alternate scripts now.
link

answered 2011-12-07 at 06:08:29

greger14's gravatar image

greger14

I just thought of a possible work around, if i a added an iframe into the no parse tags
<header name="Content-Type" value="application/xjavascript"/>
<insert file="/roxen-files/cms-templates/cmsfckconfig.
js"/>
<?noparse
<iframe src="myjavascriptcode.html" id="framer" name="framer" width="780" height="205" border="0">
?>

That may just trick the system ?? hmmmm i hope so. I can then use the ID to css the location and style.
I will let you know around 3 EST.
link

answered 2011-12-07 at 06:25:34

greger14's gravatar image

greger14

SOLUTION!!! for anyone ever searching for implementing their own code of any kind (well html, javascript, dhtml) simple add this to your XML index file
<?noparse
<iframe src="myjavascriptcode.html" id="framer" name="framer" width="780" height="205" border="0">
?>

then in your local.css file simply locate the iframe.. "framer" where ever you want it
#framer {
position: relative;
width: 780;
height: 205;
top: 100;
left: 100;
float: center;
}

I think what is happeneing is the iframe pulls the html to the client not even running through the Roxen Webserver. either way it works with anything now that i have tried
I LOVE IFRAMES
link

answered 2011-12-07 at 06:33:37

greger14's gravatar image

greger14

I've requested that this question be closed as follows:

Accepted answer: 0 points for greger14's comment http:/Q_27479720.html#37252110

for the following reason:

Everyone assisted greatly yet i did find a great solution for myself. I thank everyone here for being great with helping talk through my dilema and helping me find the solution.

link

answered 2011-12-07 at 12:23:15

greger14's gravatar image

greger14

Great job guys, unfortunately in edit mode it appears appropriately, when published it does not :( this issue is not yet resolved.
link

answered 2011-12-07 at 12:24:25

greger14's gravatar image

greger14

So as stated above, i tried to use the iframe to publish my javascript as needed in the browser, and it was working great in edit mode but as soon as i would publish it. It would not work??? there is a xsl i think that is screwing with my css maybe because it is a template based and rendered layout?? i dunno, running out of options trying a few things now any thoughts would be appreciated. other wise i think that Roxen is just an old antiquated pain in the but of a system.
   -Greg
link

answered 2011-12-10 at 07:17:03

greger14's gravatar image

greger14

okay, i fixed it, after extensive testing and verification and retesting. i was able to get javascript to work with inline css to override any template that Roxen was applying. here is what my code ended up looking like. there is duplicate non needed css styles the choosen ones will see it easily.



It appears that Roxen supports array driven javascript. just an FYI, but when it comes down to my question tha anser is you have to use:
<?noparse
?>
and all css needs to be inline and on the same page.
Thanks again for all your help
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
<page-components>
 
  <picture-component>
    <id>comp:00004885776b:000000092e:45dd</id>
    <variant>1</variant>
    <title>Welcome</title>
    <subtitle></subtitle>
    <text><p>The Department of Public Safety is committed to enhancing the living, learning and working experience at University University while maintaining a safe and secure campus.<br/>
<br/>
The Department of Public Safety welcomes you to University University. Each student, faculty member, and staff member enriches this community in many ways, including the way University looks out for itself. The Department of Public Safety hopes you will join in becoming part of a network of responsibility for everyone&#x2019;s well-being through small, routine gestures.</p>
<p>Emergency: 9-1-1 (on campus);  (off campus/mobile phone) Non-emergencies:  </p></text>
    <picture-src></picture-src>
    <picture-comment></picture-comment>
    <picture-link></picture-link>
    <picture-map></picture-map>
  </picture-component>

<?noparse <div id="menubar" style="position: relative;
         float: none;
         left: 195px;
         top: -590px;
         width: 800px;
         font-size:15px
         font-color: #fff
         padding-left: 0;
         padding-right: 0;
text-decoration : none;       
z-index: 100;" >  
<ul id="navlist" style="padding-left: 0;
         margin-left: 0;
         width: 100%;
         list-style-type: none;
         font-family: Lucida Sans, helvetica, sans-serif;
         display: inline;
         text-decoration : none;">
<li style="display: inline;
         width: 100%;
         list-style-type: none;
         padding-right: 0;
         padding-left: 0;
         text-decoration : none;">
<a STYLE="text-decoration: none;" href="#" target="_blank">
<font color="#3d341c">Emergency Preparedness</font></a></li>
<li style="display: inline;
         width: 100%;
         list-style-type: none;
         padding-right: 0;
         padding-left: 0;
         text-decoration : none;">
<a STYLE="text-decoration: none" href="#" target="_blank">
<font color="#3d341c">Office of the Executive Vice President</font></a></li>
</ul>  
</div>
?>
<?noparse <style type="text/css">

#slide {
         position: relative;
         float: center;
         left: -169px;
         top: -527px;
         width: 780px;
         height: 205;
         padding-left: 0;
         padding-right: 0;
         z-index: 100;
         border: 0;
         border-style: hidden;
         text-decoration: none;

}
a.mylink
{
text-decoration: none;
border-style: hidden;
}

a.mylink:link, a.mylink:visited
border-style: hidden;
{

text-decoration: none;
border-style: hidden;
}

a.mylink:hover
{
border-style: hidden;
text-decoration: none;
}


</style>

<html><head></head>



<body > <!-- onblur="self.close()"-->

<div style="{text-align: center}; {border-style: hidden};
" id="slide" name="slide" border="0">


<script type="text/javascript">

var i = 0;

var imageArray = new Array();

//Create each element of the array as a unique object with a src and href parameter. This is quick and dirty; you could create an 
//object 'class' for this.. but.. perhaps it's overkill. You could also use a pair of arrays with matching subscripts.

var img0 = new Object( );

img0.src = "images/Slide01.jpg"
img0.href = "http://www.microsoft.com";

var img1 = new Object( );

img1.src = "images/Slide02.jpg";
img1.href = "http://www.yahoo.com";

var img2 = new Object( );

img2.src = "images/Slide03.jpg";
img2.href = "http://www.bing.com";

var img3 = new Object( );

img3.src = "images/Slide02.jpg";
img3.href = "http://www.google.com";

//Put all of those objects into the array.

imageArray[ 0 ] = img0;
imageArray[ 1 ] = img1;
imageArray[ 2 ] = img2;
imageArray[ 3 ] = img3;

function rotateImage()
{

  if (i >= imageArray.length)
  {
    i = 0;
  }

  var img_element = document.images["pic"];
  var a_element = img_element.parentNode;

  img_element.src = imageArray[i].src;
  a_element.href = imageArray[i].href;

  i++;

  setTimeout("rotateImage()", 6000);

}

</script>


<a href="yahoo.com" onmouseover="this.style.backgroundColor = '#fff';"

 width="780" height="205" target="_blank" class="mylink" style="{border:0}; {text-decoration: none}; {border-style: hidden}:visited{color:white} :hover{color:white}
;
">
<img src="images/Slide01.jpg" 
id="pic" name="pic" style="border:0; width:780; height:205; border-style: hidden;"
  />
</a>


<script type="text/javascript">
rotateImage();
</script>

</div>

</body>

</html>?>


</page-components>
link

answered 2011-12-10 at 07:19:57

greger14's gravatar image

greger14

Thanks again for all your help

link

answered 2011-12-11 at 09:06:37

greger14's gravatar image

greger14

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×104
×125
×67
×1

Asked: 12/05/2011 11:52

Seen: 397 times

Last updated: 12/15/2011 05:16