The way that Milonic uses:
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
keeps pages from validating as XHTML 1.0 Transitional. I've run my pages through http://validator.w3.org/ and the errors I get are:
document type does not allow element "script" here
...itedesign/common/scripts/mmenuns4.js'><\/script>");
and,
character "<" is the first character of a delimiter but occurred as data
...tedesign/common/scripts/mmenuns4.js'><\/script>");
Is there any way to fix this?
Thanks
RWW
Page Validation
Yes, there's something about cdata being used. I have no idea what that is but I've read a few places on the forum where it had to be used to hide the script for whatever reason. Find Maz's name in a forum post then click her www button and check her website. Look at the source, you'll see how she uses it.
Ruth
Ruth
-
- Super Advanced
- Posts: 32
- Joined: Sun Jun 13, 2004 11:05 pm
- Location: Rotterdam, The Netherlands
- Contact:
<script type="text/javascript">
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
-->
</script>
Just add the 'comment' tags.
My site is XHTML 1.1 strict validated with this code.
Ow and remove <script language=JavaScript> and change it to <script type="text/javascript">. Don't forget to add the quotes for every value in XHTML.
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
-->
</script>
Just add the 'comment' tags.
My site is XHTML 1.1 strict validated with this code.
Ow and remove <script language=JavaScript> and change it to <script type="text/javascript">. Don't forget to add the quotes for every value in XHTML.
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
-
- Beginner
- Posts: 1
- Joined: Tue Apr 29, 2008 4:15 pm
Re: Page Validation
Hi all,
It would require the code to look as follows:
Let me know if it passes Validation.
It would require the code to look as follows:
Code: Select all
<script type="text/javascript"><!--//--><![CDATA[//><!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
//--><!]]></script>
Re: Page Validation
Actually the calls were changed a long time ago (it's in the download file!)...
Code: Select all
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="https://milonic.com/">JavaScript DHTML Menu Powered by Milonic</a></noscript>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>
John