Hi,
I'm using Jquery to submit a form. I want to loop through the form after the user clicks on a submit button to get the select option. There are many different select fields. The select options are generated using PHP.
A sample of the HTML:
<select id="selectHome_1">
<option></option>
</select>
<select id="selectHome_2">
<option></option>
</select>
<inpupt type="submit" id="update" />
The JQuery
$("#update").click(function() {
//Loop through all select fields
$("input[id^='selectHome_']").each(function(){
//Production code will do other things
alert('test');//Test to see if it works...
});
});
The code that searches for id=selectHome_ is not working (the alert box never shows).
Any ideas would be greatly appreciated.
Cheers!