Hey,
Here is how I would generally do it. If you want a great tool for making 'ajax' like loaders, try out http://www.ajaxload.info/
<div id="pleasewait" style="display:none;">
<img src="loader.gif" alt="loading"/>
</div>
So on my form, I would have an onclick to a function, like :
<form action="submit.php" method="post" onsubmit="showloader();">
</form>
I would have my javascript functions as such
function showloader() {
document.getElementByID('pleasewait').style.display='';
}
function hideloader() {
document.getElementByID('pleasewait').style.display='none';
}
}
then at the end of your submission, simply call the hide function
<script type="text/javascript">
hideloader();
</script>
If you want the image to show inside of an iframe, simply change the following
document.getElementById("myiframe").document.getElementById("showloader").style.display='none';
etc etc.
I just typed this on the fly in the browser but it should work, gimme a shout if not.
Cheers