Get the selected value from a Select box and check that value against an array in the same form
- by Rob Allen
I'm new to JSTL/EL and JSP and can't seem to find a reference which covers the following scenario:
I have an array of values in JavaScipt:
var Countries = ('US', 'CA');
I then need to check to see if the currently selected value of a standard HTML select box is in that array.
This is what I have so far:
<select id="shippingCountry">
…