我一直在使用jquery表单插件来在我的页面上创建子表单,并且它工作得很好。Jquery表单插件。提交加载表单的问题
但是,当我尝试提交已使用.load加载的窗体不起作用。
这是我的代码:
$(document).ready(function() {
//shows loading screen whilst posting via ajax
$().ajaxStart($.blockUI).ajaxStop($.unblockUI);
//post form add_customer ajax
var options = {
target: '#alert',
};
$.ajaxSettings.cache = false;
$('#add_customer').submit(function() {
$(this).ajaxSubmit(options);
return false;
});
$('#theform').hide().load('form.php', function() {
$(this).fadeIn();
return false;
});
});
我缺少什么?无法在任何地方找到解决方案。
如果你想详细说明“它不起作用”的含义,它肯定会有很大帮助。客户端的Javascript中是否存在错误?服务器发生错误?什么都没有发生?你到目前为止做了什么来调查和诊断正在发生的事情? – Pointy