W3C home > Mailing lists > Public > www-validator@w3.org > November 2000

name= in forms

From: Oyvind Holm <sunny@ba.no>
Date: Tue, 28 Nov 2000 11:32:54 +0100 (CET)
To: www-validator@w3.org
Message-ID: <Pine.LNX.4.10.10011281113090.27626-100000@sunba.ba.no>
When validating the following HTML source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html lang="en">
    <title>name= in forms</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <body onLoad="document.userform.field2.focus()">
    <h1>name= in forms</h1>
    <form action="index.cgi" method="post" name="userform">
      <p>Field 1: <input type="text" name="field1" size="20" tabindex="1">
      <br>Field 2: <input type="text" name="field2" size="20" tabindex="2">
      <br><input type="submit" value="Submit" tabindex="3">
      <input type="reset" value="Clear fields">
    <p><a href="http://validator.w3.org/check?uri=http%3A%2F%2F194.248.216.19%2Fbasnakk%2Fform.html;ss=;outline=">Validator</a>

the validator responds with

    <form action="index.cgi" method="post" name="userform">
    Error: there is no attribute "NAME"

But according to the definition, name= is allowed in FORM tags. Who's
right, the definition or the validator? I have to use name= to focus
the cursor on a specified field, and this error irritates me big time

If it's not allowed, is there any other (legal) way to force the
browser to focus the cursor on a specified field, in this example

And while we're at it... Is there a way to let the user use the ENTER
key to submit the form when using multiple text fields? Thought
"tabindex" was the right thing to use, but at least Netscape (don't
know about MSIE) does not react to it.

Greetings from Norway,
Řyvind A. Holm

|OpenPGP: 0xAD19826C 2000-01-24 Oyvind A. Holm <sunny256@mail.com>|
|Fingerprint: EAE5 DCA0 0626 5DAA 72F8  0435 2E2B E476 AD19 826C  |
=========== 2 + 2 = 5 for extremely large values of 2. ============
Received on Tuesday, 28 November 2000 05:33:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:28 UTC