jQuery: Issue with form

自古美人都是妖i 提交于 2019-12-02 20:49:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!