how to prevent pressing submit more than one time?

D

dave

Hi
I have created asp pages to submit logs online.
It is used generally to log from handset similar to
iPAQ, Pocket PC.
I have on html form and one submit button.
On pressing submit , it redirects to other pages and
inserts log into db.
But the problem is when they press submit, it takes a
little bit long to go next page so people press submit
button 2-3 times and finally its insert duplicat records
in the database.
Can any one suggest me how to prevent this?
Thanx
dave
 
D

dlbjr

Dave,

Create a unique id to each form and hide in a hidden field. When submitted,
check for a record with the form id. If no record then save the record with
the form ID . If a record exist with the id don't save. When saved issue a
new id to the form.

-dlbjr

Discerning resolutions for the alms
 
L

Lance Wynn

<form onSubmit="document.getElementByID('SubmitButtonID').disabled=true">

Should work for most browsers (I typed this from memory, so it may be a
little off), I'm not sure about PocketPC though.

Lance


Hi
I have created asp pages to submit logs online.
It is used generally to log from handset similar to
iPAQ, Pocket PC.
I have on html form and one submit button.
On pressing submit , it redirects to other pages and
inserts log into db.
But the problem is when they press submit, it takes a
little bit long to go next page so people press submit
button 2-3 times and finally its insert duplicat records
in the database.
Can any one suggest me how to prevent this?
Thanx
dave
 
D

dave

I tried tht one
But it doesnt work.
It required IE4+ to disable submit button.
Thanx
dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top