Show "Please Wait" after submitting a form

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

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: [eduran582] Show "Please Wait" after submitting a form

By Kenny - September 26, 2009 - edited: September 26, 2009

You can try a couple of options:

<input value="Submit" onClick="this.value = 'Please Wait!'">

or

<input type="submit" name="submit" onClick="this.disabled=true;">

or place this after your form

<script type="text/javascript">
function submitted() {
theButton = document.getElementById("submitbutton");
theButton.disabled = "disabled";
theButton.value = "Please Wait...";
}
</script>



Kenny

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

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