473,473 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to prevent pressing submit more than one time?

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
3 1735
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
<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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pamela Chatterjee | last post by:
In my Web Form I have more than one Textbox for user input. If I hit enter to any Textbox its submitting the form. How can I prevent Form submission if users hit enter to the textbox? I want to...
4
by: Simon Wigzell | last post by:
Is there a way to prevent a form submitting when you press enter on a text field? Some people press enter when they finish typing in a text field out of habit I guess unconcsciously thinking it...
2
by: Nick Bell | last post by:
I have a general form validation question. I know very little about javascript, a little more about PHP. Using yav (http://yav.sourceforge.net): <form method="POST" name=edit onsubmit="return...
2
by: anonieko | last post by:
Scenario: You have a page that is TOO slow to refresh. But it allows partial flushing of html contents. I.e. Submit button already appears but you don't want your users to click on it prematurely...
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
5
by: Robert S | last post by:
I am using the following to prevent the Enter key from submitting my form (this would have undesirable results): (index.html) <body onkeydown="rejectEnter( event )"> (functions.js) function...
1
by: User | last post by:
Hi, Are there ways to let browser forget about the previous submitted form data? Or prevent user from pressing F5 to submit the same form again Or prevent user from presising back on the...
6
by: Stanimir Stamenkov | last post by:
I have a form without a submit button like: <form name="form1" action="" onsubmit="alert('submit ' + this.name);"> <div> <label>Field 1: <input type="text" name="field1"...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.