I have the following field in a jsp page..
<select size="1" name="typ">
<option value="C">Coffe</option>
<option value="T">Tea</option>
</select>
Now when the user selects Coffeand and clicks submit, I want the page to go to Coffe.jsp
and when Tea is selected , i want it to go to Tea.jsp
I tried using the following jquery code but it is not working...
jQuery(document).ready(function() {
jQuery("#typ").change(function() {
if(this.options[this.selectedIndex].value == "C") {
window.location = "/Coffee.jsp";
}
});
I am a newbie in jquery script and jsp...