i've previously had some issues validating with the menu in HTML but thanks to you guys i got those all straightened out... now for XHTML 1.0 Strict. im not really sure what the problem is but here's the site i'm working on.
http://www.alabu.com/ibc/
and the validation link:
http://validator.w3.org/check?uri=http% ... ly%29&ss=1
if anyone knows how to fix those two errors (it was originally 10 but it messed with it until i got it down to 2) i would very much appreciate it. Thanks!
~Hal
trouble validating in XHTML
Haven't tried strict yet, but this looks wrong anyway. You have...
You can't have 3 </script> in a row like that. It implies nested scripts, which I'm pretty sure is a no-no. Besides, there are too many. With your code it should look like this...
You also left out the language="javascript", which I put back in. I'm not sure about the changes you made to the ns4 and dom rows. That may be for strict.
Andy's code is...
I got around a transitional error cleanly by using the <!-- --> stuff.
HTH...
Code: Select all
<script src="java/milonic_src.js" type="text/javascript"></script>
<script type="text/javascript">
if(ns4)_d.write("<script type='text/javascript' src='java/mmenuns4.js'>");
else _d.write("<script type='text/javascript' src='java/mmenudom.js'>");
</script>
</script>
</script>
<script src="java/menu_data.js" type="text/javascript"></script>
Code: Select all
<script language="javascript" src="java/milonic_src.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
if(ns4)_d.write("<script type='text/javascript' src='java/mmenuns4.js'>");
else _d.write("<script type='text/javascript' src='java/mmenudom.js'>");
</script>
<script language="javascript" src="java/menu_data.js" type="text/javascript"></script>
Andy's code is...
Code: Select all
<script language="javascript" src="/menu5/milonic_src.js" type="text/javascript"></script>
<script language="javascript">
<!--
if(ns4)_d.write("<scr"+"ipt language=javascript src=/menu5/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=javascript src=/menu5/mmenudom.js><\/scr"+"ipt>");
-->
</script>
<script language="javascript" src="/menu5/menu_data.js" type="text/javascript"></script>
HTH...
John
Thank you!! looks like the <!-- --> is what fixed it... as far as taking language out. the XHTML 1.0 strict validator told me its not a valid attribute, and also that type is a required attribute(:D dont ask me i dont keep up with these rules)... and same thing with the three </script> in a row, the validator told me i had omitted them so i kept adding them until it stopped complaining (i think it got jacked up from the IF test and stuff) anyways, this is the code that validated for me:
EDIT: For anyone else with this issue... make sure you enclose your attributes with \"attribute\" because quotes are required in XHTML 1.0 strict. The \ before the quote is an escape character which allows it to print an actual quotation mark instead of ending the current quotation(because its already inside quotation marks). same thing goes for /'s you have to escape them as \/ in order for it to read it properly...mmm hope thats not too confusing
Code: Select all
<script src="/ibc/java/milonic_src.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
if(ns4)_d.write("<scr"+"ipt type=\"text\/javascript\" src=\"\/ibc\/java\/mmenuns4.js\"><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=\"text\/javascript\" src=\"\/ibc\/java\/mmenudom.js\"><\/scr"+"ipt>");
-->
</script>
<script src="/ibc/java/menu_data.js" type="text/javascript"></script>