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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Text Box

Status
Not open for further replies.

micjohnson

Programmer
Nov 9, 2000
86
US
Hi there!

I have 3 text boxes in my form with the same name as "txtbx". The values are entered as A, B, C. How can i display these values in next page.

Thanx lot,
mic
 
You should name them differently ...
txtbx1,txtbx2,etc.

if named the same, only the value of the last text box will probably be passed through.

Is there a particular reason you need to have them named the same?

-Marc
 
Thanx Marc! I got this question from an interview.

Thanx,
micjohnson
 
if you have multiple text boxes with the same name, camma delemited list with all value will be passed through.
 
Yes, much in the same way a list box (drop down) input with the attribute 'Multiple' will pass all the CTRL-clicked values with the one name of the input.

<select name=&quot;many&quot;>
<option value=1>1
<option value=2>2
</select>

many=1,2
 
Dear strantheman!

Thanx for your wish. I got that job.

Thanx
micjohnson
 
If you post through multiple fields from a form as a POST then they arrive as a comma delimited list (ie. A,B,C).
But if you post them as a GET (ie. in the querystring), they seem to get sent as seperate variables of the same name. I could only retrieve the first value (ie. A) and not the rest.

Does anyone know a way round this?

The only thing I could think of was to get the Query_string and hunt ans chop out the values in it.
(This was on ie5, Maybe it's different on other browsers)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top