PDA

View Full Version : HELP with my script


chebs22
06-26-2008, 10:30 AM
i am currently busy witha website but if i click on my home link my navigation code goes to the top of the page please if anyone can help i have tried everything and im sure it is just a small error that i can't find www.thesoftwareshop.co.za click the home link and the error will appear

rangana
06-26-2008, 11:10 AM
I don't think this is more of a JS problem, but an HTML instead.

With that said, i'll start by saying that your structure is a mess. Transfer your <html> tag above the DTD (http://alistapart.com/articles/doctype), not otherwise.

Highlighted is deprecated:

<SCRIPT language=javascript>
<!--replace highlighted with type="text/javascript"-->


This part is erroneous:

<body onLoad=<actinic:variable value="PreloadImages" name="OnLoadScript" /> "MM_preloadImages('NAVIGATION_r1_c2_f3.gif','NAVIGATION_r1_c2_f2.gif','NAVIGATION_r3_c1_f3.gif','NAVI GATION_r3_c1_f2.gif','NAVIGATION_r5_c2_f3.gif','NAVIGATION_r5_c2_f2.gif','NAVIGATION_r7_c2_f3.gif',' NAVIGATION_r7_c2_f2.gif','NAVIGATION_r9_c2_f3.gif','NAVIGATION_r9_c2_f2.gif','NAVIGATION_r11_c1_f3.g if','NAVIGATION_r11_c1_f2.gif','NAVIGATION_r13_c1_f3.gif','NAVIGATION_r13_c1_f2.gif','NAVIGATION_r15 _c1_f3.gif','NAVIGATION_r15_c1_f2.gif','NAVIGATION_r17_c1_f3.gif','NAVIGATION_r17_c1_f2.gif')">


1.) I don't think that the value of your onload attribute is correct (80% goes to not).
2.) <body> has no value and name attributes (http://www.w3schools.com/tags/tag_body.asp).
3.) You might want to use this modification:

<body onload= "MM_preloadImages('NAVIGATION_r1_c2_f3.gif','NAVIGATION_r1_c2_f2.gif','NAVIGATION_r3_c1_f3.gif','NAVI GATION_r3_c1_f2.gif','NAVIGATION_r5_c2_f3.gif','NAVIGATION_r5_c2_f2.gif','NAVIGATION_r7_c2_f3.gif',' NAVIGATION_r7_c2_f2.gif','NAVIGATION_r9_c2_f3.gif','NAVIGATION_r9_c2_f2.gif','NAVIGATION_r11_c1_f3.g if','NAVIGATION_r11_c1_f2.gif','NAVIGATION_r13_c1_f3.gif','NAVIGATION_r13_c1_f2.gif','NAVIGATION_r15 _c1_f3.gif','NAVIGATION_r15_c1_f2.gif','NAVIGATION_r17_c1_f3.gif','NAVIGATION_r17_c1_f2.gif')">


P.S, fix your markup errors (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.thesoftwareshop.co.za%2Facatalog%2Findex.html&charset=%28detect+automatically%29&doctype=Inline&group=0) as well as your CSS errors (http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.thesoftwareshop.co.za%2Facatalog%2Findex.html&profile=css21&usermedium=all&warning=1&lang=en).

Hope it helps.