2011-03-16 67 views
0

我正在尋找一個燈箱,我可以使用給我的聯繫表格後,用戶的反饋,我看過幾個例子,但我想要簡單的任何建議。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; }

回答

2

jqmodal是一個非常不錯的簡單和可定製的模式對話框插上的jQuery他們的網站充滿了例子,它的用途是作爲簡單,只要你想:)

HTH強大!

0

我會建議使用jQuery UI庫中的模式對話框 - 這可以非常方便地滿足您的需求。