Forum Moderators: open

Message Too Old, No Replies

validation error in w3

         

dj_gie

4:12 pm on Mar 21, 2006 (gmt 0)

10+ Year Member



I am getting two errors for my homepage and i can't seem to solve them. Can someone please help?

ERROR 1. required attribute "ACTION" not specified.

<form name="jump">

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>.

ERROR 2. document type does not allow element "SCRIPT" here.

<script language="JavaScript" type="text/javascript">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

kind regards

tedster

10:39 pm on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



#1 To validate, a form element does require an action attribute. You can use an empty attribute action="" to pass validation.

#2 If you can't find any nesting errors, then also make sure the script element is contained either between <head> and </head> or between <body> and </body>

dj_gie

8:49 am on Mar 22, 2006 (gmt 0)

10+ Year Member



thank you very much. much appreciated

bezaleel

2:52 pm on Mar 31, 2006 (gmt 0)

10+ Year Member


If you are working in XHTML 1.1, the 'name' attribute is not allowed.

bezaleel

2:58 pm on Mar 31, 2006 (gmt 0)

10+ Year Member



Use:

<script type="text/javascript" src="abc.js"></script>

or

<script type="text/javascript"> place codes here</script>