473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

legal form names

What's required of a form element name?

I can't seem to fathom this from the W3C:

http://www.w3.org/TR/REC-html40/inte...l#control-name

It looks like anything at all is a good name.

I'm a bit leary of switching over to id's only, call me old fashioned.

Jeff


Jul 20 '05 #1
3 1515
Jeff Thies wrote:
What's required of a form element name?

I can't seem to fathom this from the W3C:

http://www.w3.org/TR/REC-html40/inte...l#control-name
I suppose you already know that it's cdata:

http://www.w3.org/TR/REC-html40/types.html#type-cdata
It looks like anything at all is a good name.
Not everything, but a good deal. Still, there are some things I would
not do to avoid confusion down the road. For example, I'd not put
punctuation in a name. I also prefer all lowercase.
I'm a bit leary of switching over to id's only, call me old fashioned


Unless I've missed something, I don't think one has anything to do
with the other in the context of forms. The name attribute of a form
element specifies the name submitted with the same element's value.
The id is a unique identifier for e.g. an html document. It is never
submitted, even when it is included in a form element.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #2
> > What's required of a form element name?

I can't seem to fathom this from the W3C:

http://www.w3.org/TR/REC-html40/inte...l#control-name
I suppose you already know that it's cdata:

http://www.w3.org/TR/REC-html40/types.html#type-cdata


Thanks. I found that somewhat later.

I seem to recall that either "-" or "_" at one time did not work as some
type of cdata, either classes or id's.

Do you know what that might have been, and what it failed in?

Jeff
It looks like anything at all is a good name.


Not everything, but a good deal. Still, there are some things I would
not do to avoid confusion down the road. For example, I'd not put
punctuation in a name. I also prefer all lowercase.
I'm a bit leary of switching over to id's only, call me old fashioned


Unless I've missed something, I don't think one has anything to do
with the other in the context of forms. The name attribute of a form
element specifies the name submitted with the same element's value.
The id is a unique identifier for e.g. an html document. It is never
submitted, even when it is included in a form element.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #3
"Jeff Thies" <no****@nospam.net> wrote:
I seem to recall that either "-" or "_" at one time did not work
as some type of cdata, either classes or id's.


Technically class is CDATA in the DTD, but that's just because SGML
(not to mention XML) is too limited in describing the syntax of
attribute values. The prose of the specification says that class
attribute's value shall be a space-separated list of class names.
Somewhat strangely, the HTML specification does not define the syntax
of class names, but it is natural to expect them to obey normal syntax
of names in HTML. This permits "-" and "_" among other things.
According to CSS specifications, the range of characters permitted in
class names is much wider, but I wouldn't rely on such things.
(See http://www.w3.org/TR/CSS2/syndata.ht...def-identifier )

Id attributes are declared as ID, which imposes specific syntax.

Special characters in different names may cause problems for reasons
external to CSS. If the name of a form field contains "-" or "_", then
problems may arise if the form handler cannot deal with them. But then
the question is what the form handler can do, rather than what HTML
syntax permits.

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

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: dan | last post by:
I have a script that selects a value in an option in a selection list according to how many letters were entered in an input box. I have it working but I am limited to what I can name the form...
1
by: ksrajalakshmi | last post by:
In a Solution, there may be many Windows Forms. To commit permission to all forms, i've to get the form names in the solution. Is there any proceedure for that?
2
by: Richard Bysouth | last post by:
Hi When attempting to view inherited forms in design mode I have been getting the message "The path is not of a legal form" and am unable to view the designer. I can't seem to find any...
3
by: Rob R. Ainscough | last post by:
I've started getting this error now when I load my solution and do a Build. Rebuild doesn't resolve it. Any suggestions? I suspect one of the hotfixes, but can't confirm. Rob.
2
by: Agent Michael Scarn | last post by:
Hello, I need to be able to dynamically display all of the form names from a form I just submitted. I have a javascript which will display all the names of the form on the first page, but i...
2
by: Ronald S. Cook | last post by:
I'd like your opinion on whether or not form names should be lower or mixed case (like is there a "best practice" for the style). http://www.mysite.com/Employee.aspx?Number=123456 vs ...
1
by: GS | last post by:
I got this warning for an vb application when I opened it in vb .net studio 2005 express Warning 1 The path is not of a legal form. 0 0 I thought it was project reference path. I checked and...
3
by: pantagruel | last post by:
Hi, the following: FileSystemWatcher watcher = new FileSystemWatcher(); RenderingQ = ConfigurationSettings.AppSettings; //RenderingQ = "C:\\RenditionServerQ\\InjectorQ\\OnDemandQ";...
1
by: tomg | last post by:
How can I get all of my MS Access form names into an Excel file? thanks,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.