473,396 Members | 1,726 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,396 software developers and data experts.

Sorry, this is driving me nuts...

QDL
Hello everyone,

I have this very easy task to accomplish: block clicks on a whole page after
posting to the server to prevent impatient users from clicking many times
and causing problems to the serverside-code.

I actually could do it in IE using this technique:

....
function DisableIEControls() {
try {
document.body.style.cursor = "wait";
document.attachEvent("onclick", function(){return false;});
} catch (e) {}
}

window.attachEvent('onbeforeunload',function(){Dis ableIEControls()});
....

This works fine in IE, now can someone help me writing the same for
non-Microsoft browsers...

I tried almost all but to no avail... clicks are always "sent" to server
side...

Thanx in Advance
QDL
May 29 '06 #1
2 1009
QDL said the following on 5/29/2006 12:00 PM:
Hello everyone,

I have this very easy task to accomplish: block clicks on a whole page after
posting to the server to prevent impatient users from clicking many times
and causing problems to the serverside-code.


<snip>

Have the form submit to an intermediate page that then submits to the
real server side file. The intermediate page will have a message to the
user to wait on the server to finish and to please be patient.

It is far from being fool-proof but it is better than an alternative
where you try to disable the entire page. You could do that using the
onsubmit of the form to clear the current page with a message.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 29 '06 #2
QDL wrote:
I have this very easy task to accomplish: block clicks on a whole page
after posting to the server to prevent impatient users from clicking many
times and causing problems to the serverside-code.


This is not going to work because the problem persists if client-side script
support is not present. Modify your server-side code so that it can cope
with duplicate data. It is not an uncommon problem after all.

And *please* post with a reasonable (descriptive) Subject header next time.
PointedEars
--
Set truthfulness above everything else.
When a man lies, he kills a part of the world.
-- Merlin (AFAIK)
May 29 '06 #3

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

Similar topics

6
by: Keiron Waites | last post by:
Please see the problem in action here: http://www.leadbullet.biz/contact.php If you mouse over the fields, you will see that text is shown on the right. The text makes the other fields move when...
12
by: Marty | last post by:
It seems all of the sudden that user controls that contain images are referencing image sources relative to the document that I drop the control on. This obviously does not work beacuase the...
0
by: Simon Harris | last post by:
Ok, this really is driving me nuts!!! :( 'All' I am trying to do is get the value of a named element. My XML doc is: <?xml version="1.0" encoding="utf-16" standalone="yes" ?> - <Page>...
2
by: ipmccun | last post by:
Hello all: Perhaps someone can shed some light on this: I'm trying to create a situation, while debugging, where a long running request (sleeps for 15s) and a short running request execute...
14
by: mat | last post by:
Hi all, This is weird and it is driving me nuts, please can someone explain how I can get it to return the correct answer: print '$_SESSION: '.$_SESSION.'<br />'; print '$_SESSION:...
2
by: mitsura | last post by:
Hi, I need to read a simle XML file. For this I use the SAX parser. So far so good. The XML file consist out of number of "Service" object with each object a set of attributes. I read...
5
by: jason.neo | last post by:
Hi all experts, I am going nuts with this Invalid postback or callback argument thingy with .Net 2.0 I am building a file attachment module which relays on a Datatable stored in session (yeah...
1
by: soeter04 | last post by:
Hey there, I'm having trouble with an (at first sight) easy layout: Basic layout: 3 rows: - top bar (fixed height) - middle frame (max height between bars) - bottom bar (fixed height) In...
3
by: DuncanIdaho | last post by:
Hello experts IE 7.0.5730.11 Opera 9.27 Firefox 2.0.0.14 This problem only occurs in Opera and Firefox (amazing, IE does something right, or maybe not) Anyway, the problem is that when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.