I've a form with several input fields and a button to send it to a PHP file.
I populate a select with a jQuery
script
$('#select').load('myfile.php?PR=data');
When I try to send, the value of this select is the only that doesn't go to php file.
It's like the select is on another level and the form doesn't see it.
FORM
<form action="find.php" method="post" name="find" enctype="multipart/form-data">
<select name="month" id="month" class="input">
<option value="" selected="selected"></option>
<option value="Jan">Jan</option>
<option value="Feb">Feb</option>
</select>
<select name="year" id="year" class="input">
<option value="" selected="selected"></option>
<option value="2011">2011</option>
<option value="2010">2010</option>
</select>
<div id="all"><label>ALL</label></div>
<div id="select"></div>
<input name="findit" id="findit" type="submit" value="FIND" />
</form>
jquery script
$("div#all").click(function( ){
$('div#select').load('select_all.php');
});
Select_all.php
return records correctly but find.php
doesn't receive the value of select generated by select_all.php
来源:https://stackoverflow.com/questions/4992947/jquery-issue-with-form