Multiple Submits

sepanaho

New Member
Ladies and Gents,

How have all you smart people out there stopped / handeled mutiple submits?

I mean, if you serve up a WebSpeed page where the User enters data and presses submit and WebSpeed is going to process that information on the POST and the processing / lag time is so long that the User press the submit button again...

TIA,
/Stefan Sepanaho
 

jagard

New Member
sepanaho said:
Ladies and Gents,

How have all you smart people out there stopped / handeled mutiple submits?

I mean, if you serve up a WebSpeed page where the User enters data and presses submit and WebSpeed is going to process that information on the POST and the processing / lag time is so long that the User press the submit button again...

TIA,
/Stefan Sepanaho
use javascript onsubmit event to test for the value of a javascript variable
storing the submit status if submited donot re submit

example

<SCRIPT LANGUAGE="Javascript"><!--
formsubmited = false

function chksubmit(fobj) {
if (formsubmited) return false;
formsubmited = true;
return true;
}
// -->
</SCRIPT>



<FORM METHOD="POST" ACTION="" onSubmit="return chksubmit(this)">
 

obio

New Member
or another suggestion is to disable the submit button as soon as the user presses it. Once the button is disabled, it doesn't respond to any other user inputs. You could also change the text on the button to say "submitted" as well e.g

<input id="butt1" type="button" onclick=butt1.value="submitted";butt1.disabled=true;submit(); value="press me" >
 

sepanaho

New Member
Thanks and very good but...

Can this be achieved without using JavaScript? Client requires us to do everything at the back-end.

Cheers,
/Stefan
 
Top