Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form element name with spaces 1

Status
Not open for further replies.

Slippenos

MIS
Apr 22, 2005
333
US
Can I have a form element name with spaces?

For example-

<input type = "radio" name = "User Type" value = "End User"> ?



 
ID and NAME values are CDATA (leading and trailing spaces are ignored). But:
HTML said:
6.2 ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"). colons (":"), and periods (".").
So be careful and don't use spaces in this context (using underscores instead of spaces in names is a common approach in this area)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top