0
我有一個錨以ajax響應submited窗體。它用於工作,但現在,出於某種原因,形式正在submited並繞過Ajax調用問題與錨ajax提交
代碼:
<script>
//makes anchor as submit
//searchmore is the id of the form
$('#searchmore a').click(function() {
$(this).parents('form').submit();
return false
});
//submit handling
$("#searchmore").submit(function() {
$.ajax({
type: "GET",
beforeSend: function(objeto){ /*before send function*/ },
url: $(this).attr('action'),
data: $(this).serialize(),
dataType: "text",
success: function(data){
$("#display_results").append(data);
}
});
return false;
});
</script>
,如果我有一個提交按鈕提交表單,Ajax響應的偉大工程,因此錨一定是問題
它似乎沒有語法錯誤,有什麼建議嗎?
編輯:你可以查看頁面here表格是最後。你可以找到錨(小亮藍色的盒子,上面寫着「MÁSresultados」),並提交按鈕下它
我假設`#searchmore`是你的窗體的ID? – jondavidjohn 2011-01-31 20:01:18
是的,生病更新帖子,以清除它 – 2011-01-31 20:02:24