Show "Please Wait" after submitting a form

4 posts by 3 authors in: Forums > CMS Builder
Last Post: September 28, 2009   (RSS)

By eduran582 - September 26, 2009

Not sure if this is PHP or JAVA or ?? but I'm trying to figure out how to replace the "Submit" button after it's been clicked by the user with "Please Wait" (and disable the button) while waiting for a response from another site that I've just sent a "POST" to.

It usually takes from 2 to 10 seconds for a 'response' from the other site and I don't want the user to keep clicking on the submit button.

Anyone have any ideas?

TIA!

Eric

Re: [sagentic] Show "Please Wait" after submitting a form

By eduran582 - September 27, 2009

Hi Kenny,

Thanks for the information. I have the "[font "Verdana"]<input type="submit" name="submit" onClick="this.disabled=true;"> " in place but I like the last option of not only disabling the button but putting in the 'Please Wait' caption. I'll give it a try!

[font "Verdana"]Thanks! [;)]

[font "Verdana"]Eric

Re: [eduran582] Show "Please Wait" after submitting a form

By Dave - September 28, 2009

Hi Eric,

If you are comfortable with javascript or jQuery you could try this:
http://malsup.com/jquery/block/#page

You'd probably just need to load the javascript library and the top and add this (untested) code in the form tag:
<form ... onsubmit="$.blockUI()">

But it might take some experimentation.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com