Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > how to prevent pressing submit more than one time?

Reply
Thread Tools

how to prevent pressing submit more than one time?

 
 
dave
Guest
Posts: n/a
 
      05-27-2004
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
 
Reply With Quote
 
 
 
 
dlbjr
Guest
Posts: n/a
 
      05-27-2004
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


 
Reply With Quote
 
 
 
 
Lance Wynn
Guest
Posts: n/a
 
      05-27-2004
<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" <(E-Mail Removed)> wrote in message
news:12f7401c4437f$6e971840$(E-Mail Removed)...
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


 
Reply With Quote
 
dave
Guest
Posts: n/a
 
      05-28-2004
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 a
>little off), I'm not sure about PocketPC though.
>
>Lance
>
>
>"dave" <(E-Mail Removed)> wrote in

message
>news:12f7401c4437f$6e971840$(E-Mail Removed)...
>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
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Can one declare more than one signal on one line? Merciadri Luca VHDL 4 11-01-2010 02:00 PM
STRUTS- <html:submit> does not submit on pressing Enter key Megha Vishwanath Java 2 10-02-2009 12:52 PM
how to handle more than one submit buttons Sivaswami Jeganathan ASP General 1 03-24-2006 12:01 PM
pressing back button resets page state. how to prevent? Joris Gillis Javascript 0 04-18-2005 05:04 PM



Advertisments