ajax表单提交后的建议简单的灯箱
问题描述:
我正在寻找一个灯箱,我可以使用给我的联系表格后,用户的反馈,我看过几个例子,但我想要简单的任何建议。ajax表单提交后的建议简单的灯箱
继承人我的代码
var automaticOnSubmit = cname.form.onsubmit;
cname.form.onsubmit = function(){
var valid = automaticOnSubmit();
if(valid){
$(".load").show();
$.post("http://dw.inside-the-internet.com/thewp/wp-content/themes/dwtemplate/process.php",
$("#cform").serialize(),
function(data){
if($.trim(data) == 'sent') {
//i am looking to do something here with a simple lightbox messsage ????
$(".sent").hide();
$(".load").fadeOut();
setTimeout(function() {
$('.sent').fadeIn();
}, 3500);
window.setTimeout(function() {
window.location.href = 'http://dw.inside-the-internet.com';
}, 9000);
}else{
alert(data);
$(".load").hide();
}
});
}
我已经看过http://jquery.com/demo/thickbox/等
,但他们似乎矫枉过正
任何帮助,请 返回FALSE; }
答
我会建议使用jQuery UI库中的模式对话框 - 这可以非常方便地满足您的需求。