Page 1 of 1

problem loading javascript

Posted: Sun Mar 11, 2007 4:24 pm
by stefsegers
Hi I have a question about a javascript I want to load.
I made my menu and now have a great javascript that reads the menu and replaces the with a flash item.

The problem is that when I put a window.onload in the head of my pages I get a error. It looks like the javascript isn't load because it won't exchange the menu into flash. (same code in a plain html does work)

Here's the plain html code which has to be implemented into my template:





menu


window.onload = function() {
flashLinks("navigatie");
}


body {
font:80% sans-serif;
background:#FFF;
color:#39384A;
}

#navigatie {
background:#fff;
float:left;
width:200px;
padding:10px;
}

#navigatie ul {
list-style:none;
margin:0px;
padding:0px;
}

#navigatie ul li .flashLink { /* flash magic */
width:180px;
height:27px;
}

#navigatie ul li .flashSubLink { /* flash magic */
font-size:80%;
width:180px;
height:18px;
}







HOME
OVER ONS
PORTFOLIO
CONTACT







As you can see this code has to be inserted into the head



window.onload = function() {
flashLinks("navigatie");
}



I hope somebody can help me out


Stef

Re: problem loading javascript

Posted: Sun Mar 11, 2007 4:28 pm
by Dee
Put {literal}{/literal} tags around any code containing { or } (Javascript and CSS):
http://wiki.cmsmadesimple.org/index.php ... and_Smarty

Regards,
D

Re: problem loading javascript

Posted: Sun Mar 11, 2007 4:48 pm
by stefsegers
thanks for the tip... I solved another way

putting this under the page: