how to show success form message

hi,

if i submit a form successfully, how do i show the successful message?? im having this trouble because if a form is successfully submitted, i redirect to another page/to itself so as to prevent users from resubmitting the form. i noe i can prob use query string/session to do so but i think its not a good idea.

any suggestions??

tks =)

use AJAX to submit the form




$("form").submit(function() {

    var self = this;

    $.ajax({

        url: $(self).attr("action"),

        type: $(self).attr("method"),

        data: $(self).serialize(),

        success: function() {

            //some message to show

            //redirect

        }

    });

    return false;

});



This wiki article may help.