By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,863 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

how to prevent pressing submit more than one time?

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
Jul 19 '05 #2

P: n/a
<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
"dave" <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
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
Jul 19 '05 #3

P: n/a
I tried tht one
But it doesnt work.
It required IE4+ to disable submit button.
Thanx
dave
-----Original Message-----
<form onSubmit="document.getElementByID ('SubmitButtonID').disabled=true">
Should work for most browsers (I typed this from memory, so it may be alittle off), I'm not sure about PocketPC though.

Lance
"dave" <an*******@discussions.microsoft.com> wrote in messagenews:12*****************************@phx.gbl...
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
.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.