aarschie
asked on
Selection Box parameters
Hi All,
I have two selection boxes in a JSP . I pass values from one selectionbox to the other. Making the second one as the selectedBox.
when I try to retrieve the info in the servlet. I get only one value which is Highlighted.
Could someone let me know how to get all the values.
I have two selection boxes in a JSP . I pass values from one selectionbox to the other. Making the second one as the selectedBox.
when I try to retrieve the info in the servlet. I get only one value which is Highlighted.
Could someone let me know how to get all the values.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if #1:
function validateForm(whichForm) {
var whichList = whichForm.selYOURSELECT; // *** MAKE SURE TO CHANGE TO THE NAME OF YOUR SELECT BOX
for (i=0;i<whichList.options.l ength;i++) {
whichList.options[i].selec ted = true;
}
return true;
}
call this the same way as above.
function validateForm(whichForm) {
var whichList = whichForm.selYOURSELECT; // *** MAKE SURE TO CHANGE TO THE NAME OF YOUR SELECT BOX
for (i=0;i<whichList.options.l
whichList.options[i].selec
}
return true;
}
call this the same way as above.
<form name=Form1 action="..." method=post onsubmit="return validateForm(this);">
...
</form>