DCHP
DCHP

Reputation: 1131

simple lightbox after ajax form submit suggesttions

I am looking for a lightbox that i can use to give the user feedback after my contact form has been submitted, i have looked at a few examples but i want something simple any suggesttions.

Heres my code

   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();
                        }

    });
    }

i have looked at http://jquery.com/demo/thickbox/ etc

but they all seem overkill

any help please return false; }

Upvotes: 0

Views: 3987

Answers (3)

Paddy
Paddy

Reputation: 33867

I would suggest using a modal dialog from the jQuery UI library - this would meet your needs quite handily.

Upvotes: 0

SubniC
SubniC

Reputation: 10327

Hi jqmodal is a very nice simple and customizable modal box plug in for JQuery their web site is full of examples and it use is as simple and powerful as you want :)

HTH!

Upvotes: 2

Related Questions