0
我使用jQuery的表格插件
http://malsup.com/jquery/form/jQuery的表格插件,2個按鈕
<form id="form1" name="form1" method="post" action="" enctype="multipart/form-data">
<input name="submit" id="submit1" type="submit" class="submit_button" value="Save" />
<input name="submit2" id="submit2" type="submit" class="submit_button" value="Send Sale" />
</form>
好,這樣有兩個按鈕,一個是通過Ajax形式和其他人送郵件是將數據保存到表。這裏是我使用的Jquery。
$(document).ready(function() {
// bind form using ajaxForm
$('#submit2').click(function() {
alert('ffff');
$('#form1').ajaxForm({
// target identifies the element(s) to update with the server response
target: '.loading',
beforeSubmit: showImg,
success: showResponse,
url: 'send_sale.php',
});
});
});
當我點擊保存按鈕其工作正常,但是當我在發送售點擊第一,只是在保存按鈕點擊後,保存按鈕做發送出售同樣的過程。
有誰知道最新錯誤?
UPDATE
只是通過被提交表單標籤內的按鈕,這兩個按鈕提交表單獲得的,而不是給ajaxForm