0
當我提交表單時,我的表單在fancybox中打開,數據不會在控制器中回顯,我的腳本無法在單擊事件中工作Zend framwork:當我在zend框架中從fancybox提交表單時,Ajax不工作
,尤其是圓形是我使用AJAX來發送POST數據
<script type="text/javascript">
var Q = jQuery.noConflict();
Q(document).ready(
function(){
Q("#button_submit").click(function() { //
alert('ok'); //alert is not working
var name = Q('#nam').val();
var description = Q('#description').val();
if (name != '' && description!='') {
jquery.post('transaction/add',
{'name' : name, 'description' : description },
function (respond) {
alert("ok");
}
);
}
});
});
</script>
,尤其是圓形是包含表單我的HTML代碼我的腳本代碼。這種形式在一家豪華的盒子打開
<form method="post" id="add-form" name="add-form" class="add-form">
<div class="main_form">
<table id="option-table">
<tr>
<td><label class="lable1">Name:</label></td>
<td> <input type="text" name="nam" id="nam" />
</td>
</tr>
<tr>
<td><label class="lable1">Description:</label></td>
<td><textarea id="description" name="description" rows="8" cols="45"></textarea>
</td>
</tr>
<tr>
<td >
</td>
<td id="table_submit_td">
<input type="submit" id="button_submit_fancy" class="button" name="Submit" value="Submit" />
<input type="submit" id="button_reset" class="button" name="Reset" value="Reset" />
</td>
</tr>
</table>
</div>
</form>
顯示,你必須在'HTML – emaillenin
button_submit'任何一個有一個建議代碼??? – Tarzan