Hello,
I have may have 1 or more select boxes that I need to check to see whats selected. How do I see what is selected for each select box? Please note the select box name are determined by how many the users selects. For example if the user selects 3. Three different select boxes will appear. The names of those select boxes will be isTicket1, isTicket2 and isTicket3.
The code below only works for the first select box named isTicket1.
document.pnrqueue.isTicket1.options[1].selected == 'yes';
alert(document.pnrqueue.isTicket1.options[1].selected);
Is there anyway to replace isTicket1 with a variable that holds the select box name?
I could have as many as 50 different select box names.
Any suggestions?
Thanks
DRapper
I have may have 1 or more select boxes that I need to check to see whats selected. How do I see what is selected for each select box? Please note the select box name are determined by how many the users selects. For example if the user selects 3. Three different select boxes will appear. The names of those select boxes will be isTicket1, isTicket2 and isTicket3.
The code below only works for the first select box named isTicket1.
document.pnrqueue.isTicket1.options[1].selected == 'yes';
alert(document.pnrqueue.isTicket1.options[1].selected);
Is there anyway to replace isTicket1 with a variable that holds the select box name?
I could have as many as 50 different select box names.
Any suggestions?
Thanks
DRapper