tedmcmaster
asked on
Passing variables between forms and interpreting values received in checkboxs
If you select more than one checkbox in a form and then submit the results to another page, how are the individual results identified?? For example if I submit color selections:
Color = red
Color = white
Color = blue, and I only select red and blue and submit them. What is the mechanism that allows me to identify the colors I recieve on the new page. Is it an array?
I have several text on HTML and cannot see an answer or technique using this.
Thanks
Color = red
Color = white
Color = blue, and I only select red and blue and submit them. What is the mechanism that allows me to identify the colors I recieve on the new page. Is it an array?
I have several text on HTML and cannot see an answer or technique using this.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have used checkboxes then each should have a different name. The value passed to the next page will be something like ?red=true&white=&blue=true if form elements with the names red and blue and checked.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
I am not sure but try to us ID tag and identify your control or submitted value by seeing this ID value.
Eg:
<INPUT type="checkbox" id="checkBox1" name="checkBox1" value="1">RED</TD>
<INPUT type="checkbox" id="checkBox2" name="checkBox1" value="1">GREEN</TD>
<INPUT type="checkbox" id="checkBox3" name="checkBox1" value="1">BLUE</TD>
Now even if the name is same your ID value will be different. On the posted form you can fetch ID by using.
Request.getParameterById(c heckBox1")
Cheers and all the best!
I am not sure but try to us ID tag and identify your control or submitted value by seeing this ID value.
Eg:
<INPUT type="checkbox" id="checkBox1" name="checkBox1" value="1">RED</TD>
<INPUT type="checkbox" id="checkBox2" name="checkBox1" value="1">GREEN</TD>
<INPUT type="checkbox" id="checkBox3" name="checkBox1" value="1">BLUE</TD>
Now even if the name is same your ID value will be different. On the posted form you can fetch ID by using.
Request.getParameterById(c
Cheers and all the best!