It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Textbox Array Issues

Textbox Array Issues

Postby JGrummell on Thu Apr 13, 2006 3:12 pm

I am using several textboxes with the same name to create an array.

<INPUT TYPE="TEXT" Name="test1" VALUE="A">
<INPUT TYPE="TEXT" Name="test1" VALUE="B">
<INPUT TYPE="TEXT" Name="test1" VALUE="C">
<INPUT TYPE="TEXT" Name="test1" VALUE="D">

So when the contents is submitted it appears like:

test1 = A,B,C,D
And a split of the value returns 4 array items.

The Problem I am facing is that if the texboxes contain commas. For Example:
<INPUT TYPE="TEXT" Name="test1" VALUE="A,1">
<INPUT TYPE="TEXT" Name="test1" VALUE="B,2">
<INPUT TYPE="TEXT" Name="test1" VALUE="C,3">
<INPUT TYPE="TEXT" Name="test1" VALUE="D,4">

The content submitted appears like:

test1 = A,1,B,2,C,3,D,4
And a split of the item returns 8 items.

Has anyone faced this problem before and knows of a way around it?

James
JGrummell
 
Posts: 0
Joined: Thu Apr 13, 2006 3:10 pm

Who is online

Users browsing this forum: No registered users and 5 guests