Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Valid form element names? How to use ID instead of name? Processing form data

Reply
Thread Tools

Re: Valid form element names? How to use ID instead of name? Processing form data

 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      03-06-2004
"Grahammer" <postmaster@127.0.0.1> wrote:

> Sorry for the newbie questions...


You seem to need some help with getting started with Usenet. Please
check http://www.cs.tut.fi/~jkorpela/usenet/dont.html

> Is there a link somewhere that shows what defines a valid form
> object (element) name or ID?


We just had (or we are still having) a discussion of this in alt.html
under the heading "Can tag name begin with a "-" character?". It's
really about field names, despite the wording.

> <input type="text" name="UserInput$" id="textbox1">
> <input type="text" name="UserInput_" id="textbox1">
> <input type="text" name="UserInput+" id="textbox1">


All those name attributes are correct, as long as your form handler can
deal with it. All Ascii characters are OK there.

> ...also, could I use the ID like this since the input box has both
> a name and ID?


No, the id attributes are definitely incorrect, since the id attribute
must be unique within a document. This belongs to the very essence of
that attribute - it's raison d'etre, so to say. The id attribute makes
no contribution to the form data, though. What you do in client-side
preprocessing is a different issue, but surely you can find a way to
work with unique id attributes, or take a different approach (like a
class attribute, maybe).

By the way, a validator (that is, an SGML validator, often misleadingly
called "HTML validator") would have reported the problem with id
attributes, since the HTML doctypes declare id attributes so that
uniqueness is even a syntactic constraint.

> I'm using a loop to process a form and I know how to read the
> object name and value, but how about ID?


Well, for _such_ questions, it is best to post a separate question
(after resolving the HTML questions) to _a_ group discussing the
scripting language you use.

> P.s. Feel free to remove groups... I'm watching all that I've
> posted to.


If you have to crosspost, you're at least supposed to set followups (in
almost all cases). Now set to alt.html, but please notice that it is
more useful to continue an existing recent thread than to start a new
one or to post to a new one that revolves around the same issue.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
Steve R.
Guest
Posts: n/a
 
      03-06-2004
Jukka K. Korpela wrote in message ...
> You seem to need some help with getting started with Usenet. Please
> check http://www.cs.tut.fi/~jkorpela/usenet/dont.html


It's all very well you posting these "How to use Usenet" links Jukka, BUT
it would be better if you actually told the OPs what they had done wrong
first, then point them to the URL

A whole thread has developed as a result of one of your previous pointers,
as the OP had no idea what he had done wrong.


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      03-06-2004
"Grahammer" <postmaster@127.0.0.1> wrote:

> I have no clue


Thank you for making that explicit. Now, please don't fix the From
field before you have a clue. TIA.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Michael Winter
Guest
Posts: n/a
 
      03-06-2004
On Sat, 06 Mar 2004 14:58:43 GMT, Grahammer <postmaster@127.0.0.1> wrote:

[snip]

> [...] but all the groups were relevant to my questions (as far as I
> know) and I am watching all the groups as well.


I think that it was off-topic in comp.lang.java.javascript. I believe the
point of that group is to address queries that concern using Java and
JavaScript together: to call a script from an applet, for example.

Mike

--
Michael Winter
lid (replace ".invalid" with ".uk" to reply)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Valid form element names? How to use ID instead of name? Processing form data Michael Winter HTML 4 03-06-2004 10:21 PM
Re: Valid form element names? How to use ID instead of name? Processing form data Robert HTML 0 03-06-2004 07:31 PM
Re: Valid form element names? How to use ID instead of name? Processingform data DU HTML 0 03-06-2004 02:44 PM
Document Object Model - table instead of form?? - slow processing in large form! Edward Javascript 0 02-05-2004 11:26 AM
Document Object Model - table instead of form?? - slow processing in large form! Edward Javascript 1 01-04-2004 03:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57