Hi
I am using milonic and I am having a problem. The following code is giving error with W3C when I am validating my page:
-------------------------------
<script type="text/javascript">
if(ns4)_d.write("<script src=script/mmenuns4.js type=text/javascript><\/script>");
else _d.write("<script src=script/mmenudom.js type=text/javascript><\/script>");
</script>
-------------------------------
I am using Visual Studio 2008.
Waiting for reply with solution and Thanks for you help in advance.
Problem with W3C Validation
-
- Beginner
- Posts: 6
- Joined: Fri Dec 26, 2008 8:34 am
- Location: New Delhi, India
- Contact:
Re: Problem with W3C Validation
Hi,
I believe you're going to need cdata tags for the call for those files.
If you do NOT need to support NS4, and there aren't many who use that browser anymore, then you can fix the problem by leaving out the if statement and just calling the mmenudom.js file. Given that NS4 is over 12 years old I believe, unless you have a really specialized audience, i.e. some less technical developed countries may have it, there is really no reason to support it.
Ruth
I believe you're going to need cdata tags for the call for those files.
Code: Select all
<script language="javascript" 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>
Code: Select all
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="your_data_file_name.js"></script>