On pages that take more than a few seconds to complete, its a good idea to show some type of in-progress meter. Things like bulk email processing and large file uploads are good candidates. Often this doesn’t need to be as complicated as a real progress meter, where you show the actual percentage complete. Instead, an “in progress” meter just gives feedback to the user to let them know that something is going on.
<p style="visibility:hidden" id="inprogress"> <img id="inprogress_img" src="progress.gif"> Please Wait... </p>
<input type="submit" onclick="document.getElementById('inprogress').style.visibility='visible'">
Note that there is an image used in the in-progress message, this is important. A static “Please Wait” message tells your user they should wait, but without the feedback of the moving image, they could still get the impression something is locked up. You can get some awesome free progress meters from http://www.ajaxload.info.
<input type="submit" onclick="return doSubmit()">
If your form is long enough that it needs scroll bars, be sure to place the in-progress message where the user will see it when they click the submit button.