problem loading javascript

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
stefsegers
Forum Members
Forum Members
Posts: 84
Joined: Sun Feb 11, 2007 11:03 am

problem loading javascript

Post 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
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: problem loading javascript

Post by Dee »

Put {literal}{/literal} tags around any code containing { or } (Javascript and CSS):
http://wiki.cmsmadesimple.org/index.php ... and_Smarty

Regards,
D
stefsegers
Forum Members
Forum Members
Posts: 84
Joined: Sun Feb 11, 2007 11:03 am

Re: problem loading javascript

Post by stefsegers »

thanks for the tip... I solved another way

putting this under the page:



Post Reply

Return to “Layout and Design (CSS & HTML)”