View Single Post
Old 03-01-2005, 04:12 PM   #9 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
It depends on the nature of the application. If you just want something to stop uses from crazy clicking, then some javascript might be a good thing to add.

eg:
(excuse my shoddy js)

Code:
<script>
<!--
var sv = '';
function do_form1_submit() {
   sv = document.form1.Submit.value;
   document.form1.Submit.disabled = true;
   document.form1.Submit.value = 'Please wait...';

   setTimeout('document.form1.Submit.disabled = false;', 10000);
   setTimeout('document.form1.Submit.value = sv;', 10000);

}
//-->
</script>
<form action="phpmail.php" method="post" enctype="multipart/form-data" name="form1" onSubmit="do_form1_submit();">
<p>
<input name="companyname" type="text" id="companyname4">
Company Name*</p>
<!-- [snip form] -->
<input type="submit" name="Submit" value="Submit">
</p>
<p>
<input type="reset" name="Submit2" value="Reset">
</p>
</form>

... have to run now, but I'll see if I can work up a php session example if the JS method wont work.

-r

Last edited by idx; 03-01-2005 at 04:53 PM.
idx is offline   Reply With Quote