"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