Link to home
Start Free TrialLog in
Avatar of Softacid
Softacid

asked on

Nice Please wait Loading message

How to add a nice message after the submit button is clicked till the post page is loaded a message like please wait loading we searching for the best options for you ?
Avatar of matthew016
matthew016
Flag of Belgium image

jQuery has a nice plugin:
http://malsup.com/jquery/block/

Check the examples:
http://malsup.com/jquery/block/#element
Avatar of Softacid
Softacid

ASKER

Is nice but how i set to disappear when the other page load and appear when the submit button clicked?
To make it appear, there are several solutions depending on your needs
(e.g. you want to block the whole page ? just the form ? etc.)
That's explained in details in the example codes.

I would call the code on the callback function on the submit event.
E.g.
$('#myForm').submit(function() {
     $('div.formWrapper').block({
                message: '<h1>Submitting the form</h1>',
                css: { border: '3px solid #a00' }
     });
     // your code
});

It's usually used when you submit a form through ajax. Once your ajax has been completed, you call e.g.
$('div.formWrapper').unblock();

If you aren't using ajax, you don't need to unblock as a new page will load. However, in some browsers you may have a blank screen as the loading page ? To test ...
Thank you .. i tried something like attachment but no luck :(



index.html
ASKER CERTIFIED SOLUTION
Avatar of matthew016
matthew016
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great thank you is working now.