Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Input element duplicate names?

Reply
Thread Tools

Re: Input element duplicate names?

 
 
Harlan Messinger
Guest
Posts: n/a
 
      02-28-2009
Ed Jay wrote:
> Bad or OK...more than one input element with same name,
> but in different forms?
>
> Example:
>
> <form name = "form1"....>
> <input name = "joe"...>
> </form>
>
> <form name = "form2"....>
> <input name = "joe"...>
> </form>
>


No problem at all, and to be expected if you have multiple forms on the
same page that submit different sets of data to the same server resource.

You can even have multiple input fields with the same name inside one
form if the process on the server is prepared to deal with multiple
pairs like joe=x&joe=y&joe=z in form data. ASP, for example, handles
this situation by treating Request("joe") as an array.
 
Reply With Quote
 
 
 
 
Harlan Messinger
Guest
Posts: n/a
 
      02-28-2009
Harlan Messinger wrote:
> Ed Jay wrote:
>> Bad or OK...more than one input element with same name, but in
>> different forms?
>>
>> Example:
>>
>> <form name = "form1"....>
>> <input name = "joe"...>
>> </form>
>>
>> <form name = "form2"....>
>> <input name = "joe"...>
>> </form>
>>

>
> No problem at all, and to be expected if you have multiple forms on the
> same page that submit different sets of data to the same server resource.
>
> You can even have multiple input fields with the same name inside one
> form if the process on the server is prepared to deal with multiple
> pairs like joe=x&joe=y&joe=z in form data. ASP, for example, handles
> this situation by treating Request("joe") as an array.


Oh--as to the question of whether it's *valid* in HTML: yes.
 
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: Input element duplicate names? Jukka K. Korpela HTML 2 03-01-2009 07:31 AM
how to Update/insert an xml element's text----> (<element>text</element>) HANM XML 2 01-29-2008 03:31 PM
detect duplicate element in SAX usgog@yahoo.com XML 2 09-25-2006 01:09 AM
XML schema: duplicate element occurences John Jørgensen XML 2 07-09-2004 09:11 AM
About schema : duplicate element definition or reference cr XML 0 08-08-2003 03:25 PM



Advertisments