Re: javascript form name?

The NAME attribute isn't in HTML 4.0, but it is in HTML 4.01.  In HTML 4.0,
you must use the ID attribute (even though NAME is in HTML 4.01, ID is
recommended).

As far as ACTION goes, requiring it makes sense.  The FORM element is meant
to be a fill-out form that sends data to a server.  To use form controls as
UI elements, just use them as normal inline elements (not within a FORM).

Caveat:  Using form controls outside a FORM will incorrectly make them
invisible in Netscape 4.  This has been fixed in Netscape 6 PR1, however.

----- Original Message -----
From: <pmichaels@hifi.com>
To: <www-validator@w3.org>
Sent: Thursday, July 20, 2000 12:32 PM
Subject: javascript form name?


Hi I was testing out a simple page (i am learning CSS/DHTML but also was
trying out client side image maps)

I was surprised that it flagged FORM NAME since Javascript names are fairly
routine for many tags.

I can reluctantly agree that ACTION is required, but that would be only for
server/mailto POST/GET, and again not required for javascript.

I'd love your feedback on this, if not to also include it in your DTD?

-- Philip




Line 47, column 11:

       <form NAME="ff"><input type="text" size="30" name="tty"></form>
                  ^

     Error: there is no attribute "NAME"

     Line 47, column 15:

       <form NAME="ff"><input type="text" size="30" name="tty"></form>
                      ^

     Error: required attribute "ACTION" not specified

Received on Sunday, 23 July 2000 09:57:14 UTC