I'm trying to validate my xhtml page using the w3c validator, but there is 1 error:

Line 103, Column 15: there is no attribute "name"

<form name="checkForm" action="http://tl28serv.uws.edu.au/twainfo/form.asp" …

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.


my assignment specify that we must conform to the XHTML strict DTD and must validate our page using the w3c validator.
I tried changing the <form name="checkForm"> to <form id="checkForm>, the error is then gone, but some of my javascripts for the page isn't working.

anyone pls help, thanks

If you change name into id, then check your javascript. If at some points you try to find the form by name, you must search by id instead.

If you change name into id, then check your javascript. If at some points you try to find the form by name, you must search by id instead.

can you teach me how to search by id?

below is one of my javascript that is affected by changing name to id, the name of the form is "checkForm" :

<script type="text/javascript">
      function enable_text(status)
      {
      status=!status;
      document.checkForm.dropdown.disabled = status;
      }
      </script>

thanks a lot.

pritaeas thanks again!! it works now!

Glad to help. Please mark this thread as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.