Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:46

W3C validation 2


Poster: pieter53
Dated: Tuesday December 19 2006 - 16:12:33 GMT

I have read this topic, but I'm not sure if I can use the same solution.

So here I go:
This is in the head of the document:

<script language="JavaScript" src="milonic_src.js" type="text/javascript"></script>
<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>
<script language="JavaScript" src="menu_data.js"
type="text/javascript"></script>
<script type="text/javascript" src="tooltips.js"></script>


and this is what W3C tells me:

# Error Line 16 column 31: required attribute "TYPE" not specified.

<script language="JavaScript">

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.



What to do?

(I can't remember where I copied that part of the header from and if I realy need:
<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>

, sorry!)


This is my site and I think your menu is wonderfull!


Poster: Ruth
Dated: Tuesday December 19 2006 - 19:23:20 GMT

Hi,

It's telling you to put a type into the script tag that doesn't have it.

Code:
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");      
  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>


If you don't need to support NS4 you can just code the calls as:

Code:
<script language="JavaScript" src="milonic_src.js" type="text/javascript"></script>
<script language="JavaScript" src="mmenudom.js" type="text/javascript"></script>

<script language="JavaScript" src="menu_data.js"
type="text/javascript"></script>
<script type="text/javascript" src="tooltips.js"></script>


Ruth


Poster: pieter53
Dated: Tuesday December 19 2006 - 19:45:38 GMT

Thanks!

I don't know if I need NS4 or not :oops:
I will try to find that out tomorrow.

Pieter, Schoonoord, The Netherlands