the_kid
asked on
Page Redirection
I have a processing page (act_process.cfm) that does an insert into the DB. Once somebody reached this page I want to make sure they don't click the "back" button in the browser and re-submit. Does anybody know how I can get around this? Thanks...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
One Better Idea what I can suggest is that, before INSERTing into the table, first try to select that record with the keys, then check the recordcount.
If recordcount is greater than 1 then don't insert, else insert into the table.
Thanks
Aga.
If recordcount is greater than 1 then don't insert, else insert into the table.
Thanks
Aga.
ASKER
Thanks...this seems like the easiest solution
<SCRIPT LANGUAGE="javascript">
formsubmitted=0
function chkform(){
if(formsubmitted==0){
formsubmitted=1;
return true;
}else{
alert("Form has already been submitted!");
return false
}
}
</SCRIPT>
<FORM ONSUBMIT="return chkform()" ...