PDA

View Full Version : Javascript W3C Validation


TLaT
11-25-2002, 04:10 PM
Dear all,

I am currently designing a website that must be W3C compliant, but I have been requested to include a javascript dropdown menu.
The menu itself works fine, but when validated comes up with the following errors:

<FORM NAME="jumpy"> Error: required attribute "ACTION" not specified
<SCRIPT LANGUAGE="javascript"> Error: required attribute "TYPE" not specified

Any suggestions would be appreciated! My code runs thus:-

<FORM NAME="jumpy"><DIV ALIGN="LEFT">
<P><SELECT NAME="example" SIZE="1" ONCHANGE="gone()">
<OPTION SELECTED="SELECTED" VALUE="Index.htm">------- Browse Current Themes
------- </OPTION><OPTION VALUE="BuildViews.htm">Buildings and Views</OPTION>
<OPTION VALUE="Education.htm">Education</OPTION> <OPTION
VALUE="Events.htm">Events</OPTION> <OPTION VALUE="Health.htm">Health and
Welfare</OPTION> <OPTION VALUE="HomeLife.htm">Home Life</OPTION>
<OPTION
VALUE="AllThumb.htm">View all Thumbnails</OPTION> </SELECT>
<SCRIPT LANGUAGE="javascript">
<!--function gone()
{
location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
}
//-->
</SCRIPT>
</P>
</DIV>
</FORM>

beetle
11-25-2002, 04:16 PM
<FORM NAME="jumpy"> Error: required attribute "ACTION" not specified
<SCRIPT LANGUAGE="javascript"> Error: required attribute "TYPE" not specified

<FORM NAME="jumpy" action="">
<SCRIPT LANGUAGE="javascript" type="text/javascript">

TLaT
11-25-2002, 04:26 PM
Excellent! Many thanks! The site now has a clean bill of health! :D

cg9com
11-25-2002, 05:39 PM
obviously your using html
if you ever switch to xhtml then language will give you a validation problem