473,545 Members | 1,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1520
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
2936
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 fields because they are dynamically created by a PHP script. I can get it to work with simple name but not with names outputted by the script. Is...
1
1715
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
10760
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 further information on this error - does anyone know what the problem and resolution might be? thanks
3
11357
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
1508
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 need them displayed on the post page. Any help would be greatly appreciated!
2
1407
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 http://www.mysite.com/employee.aspx?number=123456 I'm guessing lay Internet users might not know that URLs are not case
1
4400
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 they looked perfectly fine and the corresponding directories still exist and looked ok I also check the project references what else can the...
3
6977
by: pantagruel | last post by:
Hi, the following: FileSystemWatcher watcher = new FileSystemWatcher(); RenderingQ = ConfigurationSettings.AppSettings; //RenderingQ = "C:\\RenditionServerQ\\InjectorQ\\OnDemandQ"; watcher.Path = RenderingQ; raises the following error:
1
1749
by: tomg | last post by:
How can I get all of my MS Access form names into an Excel file? thanks,
0
7653
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7749
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5965
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5322
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4942
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3444
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1871
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
695
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.