473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Prevent form submission twice on doubleclick in NN6.


Hi,
I have a form in which I have this link :- <
href="javascript:submitform(parameters );"> . In the JavaScript
function submitform, there is the code for submitting the form.Thi
works fine with single click on both IE,NN6.In IE the form is submitte
only once even for double click.But if you double click on the link i
NN6, the form is submitted twice. This causes problem. The workaroun
for this was that we set a flag(indicating form submission) in th
submitform function, we also set a timer which calls the functio
resetflag after 3 seconds.So any click within 3 seconds of the firs
click will be ignored (so that the form is not submitted for the secon
click).

function submitform(params)
{
if(flag==0)
{
flag=1;
timeout = setTimeout('resetflag()',3000);
document.form1.action = someURL;
document.form1.submit();
}

}

function resetflag()
{
flag=0;
}
Jul 20 '05 #1
1 2524
"G4Gun" <G4**********@mail.forum4designers.com> wrote in message
news:G4**********@mail.forum4designers.com...
<snip>

fourm4designers.com is a bad place to read comp.lang.javascript from
because their presentation of the group garbles the Usenet posts it is
derived from. Removing *significant* formatting, omitting sections and
adding text and white space that was not part of the original posts to
Usenet. And they only report a fraction of the posts made to the
group, giving an incomplete and inaccurate representation of the group.

In addition, the posting mechanism used by forum4designers.com fails
to properly implement RFC 1036 (Standard for Interchange of USENET
Messages), and in a way that is likely to result in confusion as to
conversational flow and intended respondee for anyone using genuine
Usenet software.

forum4designers.com is also a bad pace to ask javascript questions
from because their misrepresentation of the group, combined with
deliberate deceptions about the nature of the service that they
provide, have resulted in a level of resentment of
forum4designers.com that will negatively impact on anyone who decides
to associate themselves with that web site.

But being aware that forum4designers.com may not report posts made in
response to questions asked from there, and will actively
modify/distort any responses they do show, potential responders may
consider it a waste of there time to put any effort into responding to
posts originating from forum4designers.com even if they have no
attitude towards that site.

Many other sites provide superior web-based access to Usenet, and
often without distortion or omission, including groups.google.com
(who also provide extensive and flexible archive searching
facilities). But the best method of reading and posting to
comp.lang.javascript is through a news server via (standard and
standards conforming) newsreader software.

Richard.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: entoone | last post by:
I have an html form, that has fields and when the submit button is pressed, the information is transferred to a php file. Which then inserts the data into my sql database. How can I go about...
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...
6
by: nick4soup | last post by:
I have read the CGI FAQ 'How can I avoid users hitting "submit" twice' (on http://www.htmlhelp.org/faq/cgifaq.3.html#19 ) which essentially says you have to detect it at the server, using a...
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...
2
by: APA | last post by:
Why does adding code to the form submit function using the RegisterOnSubmitStatement method prevent the server side event handler for the submit button from firing? This is completely useless. I...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
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"...
6
by: smk17 | last post by:
I've spent the last few minutes searching for this question and I found an answer, but it wasn't quite what the client wanted. I have a simple online form where the user needs to fill out five...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
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...

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.