473,732 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ 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 1750
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="docum ent.getElementB yID('SubmitButt onID').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*******@disc ussions.microso ft.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="docum ent.getElementB yID ('SubmitButtonI D').disabled=tr ue">
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*******@disc ussions.microso ft.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
5998
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 submit the form only when user will hit submit button. Thanks for any help.
4
16661
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 will take them to the next field. Instead it submits the form and this causes all kinds of problems in my case. Any javascript solution?
2
2266
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 performCheck('edit', rules, 'classic');" action="pages_edit_submit.php"> <input type="text" name="title"> <input type="submit" name="Save"> <input type="submit" name="Cancel"> </form>
2
3821
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 because other parts are still coming. Here I put a javascript the will enable only submit button only after 5 seconds after the page is load fully.
16
6265
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
7326
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 rejectEnter( oEvent ) { if ( 13 == oEvent.keyCode )
1
5730
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 browser? Please advise.
6
5091
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" onchange="alert(this.name + '=' + this.value);"></label></div> <label>Field 2: <input type="text" name="field2" onchange="alert(this.name + '=' + this.value);"></label></div> </form>
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9181
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.