473,659 Members | 3,277 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Slow 'onclick' response in IE

Hi, folks.

I've recently been doing a few simple tests and experiments. As a result,
I've noticed that, in dealing with 'onclick', IE seems less able than
Firefox to keep up with rapid clicking. In fact, Firefox seems to be able to
keep up with me no matter how rapidly I click, whereas IE... well, doesn't!

The following snippet of code demonstrates this (on my machine it does
anyway):

<html>
<body onload="valueEl ement = document.getEle mentById('value ')">
<p id="value">0</p>
<p><input type="button" onclick="valueE lement.innerHTM L++"
value="Incremen t"></input></p>
</body>
</html>

Can anyone else confirm that IE is unable to keep up with rapid clicking of
the button in this code, and that it's not just something wrong on my
machine? Does anyone have any suggestions on making IE respond more quickly?

Thanks in advance for any info.

A.
Nov 6 '06 #1
12 9552


On Nov 6, 12:03 pm, "Andrew C" <nonse...@total ly.made.upwrote :
Hi, folks.

I've recently been doing a few simple tests and experiments. As a result,
I've noticed that, in dealing with 'onclick', IE seems less able than
Firefox to keep up with rapid clicking. In fact, Firefox seems to be able to
keep up with me no matter how rapidly I click, whereas IE... well, doesn't!

The following snippet of code demonstrates this (on my machine it does
anyway):

<html>
<body onload="valueEl ement = document.getEle mentById('value ')">
<p id="value">0</p>
<p><input type="button" onclick="valueE lement.innerHTM L++"
value="Incremen t"></input></p>
</body>
</html>

Can anyone else confirm that IE is unable to keep up with rapid clicking of
the button in this code, and that it's not just something wrong on my
machine? Does anyone have any suggestions on making IE respond more quickly?

Thanks in advance for any info.

A.
I'm no expert on this, but it seems that when a "Double Click" event it
fired on IE it won't trigger the "Single Click".

Adding:
ondblclick="val ueElement.inner HTML++"
to the Button allows IE to keep up with your clicks.

But this adds a problem with FireFox, as a Double Click would trigger
both the ondblclick and onclick, hence counting twice.

I'd suggest searching on cross browser ways of solving this, maybe
disabling the doubleclick when not IE.

Nov 6 '06 #2

"[on]" <sw********@gma il.comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
>
On Nov 6, 12:03 pm, "Andrew C" <nonse...@total ly.made.upwrote :
>Hi, folks.

I've recently been doing a few simple tests and experiments. As a result,
I've noticed that, in dealing with 'onclick', IE seems less able than
Firefox to keep up with rapid clicking. In fact, Firefox seems to be able
to
keep up with me no matter how rapidly I click, whereas IE... well,
doesn't!

The following snippet of code demonstrates this (on my machine it does
anyway):

<html>
<body onload="valueEl ement = document.getEle mentById('value ')">
<p id="value">0</p>
<p><input type="button" onclick="valueE lement.innerHTM L++"
value="Increme nt"></input></p>
</body>
</html>

Can anyone else confirm that IE is unable to keep up with rapid clicking
of
the button in this code, and that it's not just something wrong on my
machine? Does anyone have any suggestions on making IE respond more
quickly?

Thanks in advance for any info.

A.

I'm no expert on this, but it seems that when a "Double Click" event it
fired on IE it won't trigger the "Single Click".

Adding:
ondblclick="val ueElement.inner HTML++"
to the Button allows IE to keep up with your clicks.

But this adds a problem with FireFox, as a Double Click would trigger
both the ondblclick and onclick, hence counting twice.

I'd suggest searching on cross browser ways of solving this, maybe
disabling the doubleclick when not IE.
Thank you! That seems to be it.

I now catch the 'ondblclick' event and check 'navigator.appN ame' to
determine if the browser is 'Microsoft Internet Explorer'. If it is, I
duplicate the 'onclick' behaviour for it; if it's not IE, I do nothing. It
works fine.

Any idea whether it's IE or FF that's doing the 'right' thing (or at least
the most common thing)? Is it safe to have one set of behaviour for IE, and
something else for all other browsers, or is FF the odd one out? Any clue?

Thanks again.

A.
Nov 6 '06 #3
VK

Andrew C wrote:
Hi, folks.

I've recently been doing a few simple tests and experiments. As a result,
I've noticed that, in dealing with 'onclick', IE seems less able than
Firefox to keep up with rapid clicking. In fact, Firefox seems to be able to
keep up with me no matter how rapidly I click, whereas IE... well, doesn't!
It is not relevant to IE but to Windows OS. It has special option
"Detect accidental double clicks" on by default. It means that for each
two clicks that can be interpreted as one double click (same place,
short enough interval) the system applies rather complicated neuristic
trying to guess was it indeed double click or an error. You see this
neuristic in action rather often on your desktop: when "by web-habit"
you double click an icon on the desk but only one application instance
is launched.

It also means that you should not use doubleclick event handler for
your Web solutions: *never*. To see your sample "working" you can
change your registry settings. If you don't have TweakUI installed, see
<http://www.winguides.c om/registry/display.php/965/for manual
settings change.

Naturally it doesn't help much to your future users.

Nov 6 '06 #4
ASM
Andrew C a écrit :
"[on]" <sw********@gma il.comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
>On Nov 6, 12:03 pm, "Andrew C" <nonse...@total ly.made.upwrote :
>>Hi, folks.

I've recently been doing a few simple tests and experiments. As a result,
I've noticed that, in dealing with 'onclick', IE seems less able than
Firefox to keep up with rapid clicking. In fact, Firefox seems to be able
to
keep up with me no matter how rapidly I click, whereas IE... well,
doesn't!

The following snippet of code demonstrates this (on my machine it does
anyway):

<html>
<body onload="valueEl ement = document.getEle mentById('value ')">
<p id="value">0</p>
<p><input type="button" onclick="valueE lement.innerHTM L++"
value="Increm ent"></input></p>
</body>
</html>

Can anyone else confirm that IE is unable to keep up with rapid clicking
of
the button in this code, and that it's not just something wrong on my
machine? Does anyone have any suggestions on making IE respond more
quickly?

Thanks in advance for any info.

A.
I'm no expert on this, but it seems that when a "Double Click" event it
fired on IE it won't trigger the "Single Click".

Adding:
ondblclick="va lueElement.inne rHTML++"
to the Button allows IE to keep up with your clicks.
Not on mine : he is only a little less lazy.
>disabling the doubleclick when not IE.
why that ?
Thank you! That seems to be it.
Not really (for me)
I now catch the 'ondblclick' event and check 'navigator.appN ame'
no ... better is :

var IE = false; /*@cc_on IE = true; @*/

then

onmouseup="if(I E) doThat();"
onclick="if(!IE ) doThat();"

Any idea whether it's IE or FF that's doing the 'right' thing (or at least
the most common thing)? Is it safe to have one set of behaviour for IE, and
something else for all other browsers, or is FF the odd one out? Any clue?
I think in regard the very poor gain with astucious double click, the
best is to leave IE runing as it's choice :-)
and leave others browsers to do same

--
ASM
Nov 6 '06 #5
ASM
VK a écrit :
Andrew C wrote:
>Hi, folks.

I've recently been doing a few simple tests and experiments. As a result,
I've noticed that, in dealing with 'onclick', IE seems less able than
Firefox to keep up with rapid clicking. In fact, Firefox seems to be able to
keep up with me no matter how rapidly I click, whereas IE... well, doesn't!

It is not relevant to IE but to Windows OS.
Again ... !

My IE on my Mac is very lazy with proposed test, very.
It has special option
"Detect accidental double clicks" on by default.
Windows ?
If it is, why doesn't it slow FireFox's clicks ?

(snip)
It also means that you should not use doubleclick event handler for
your Web solutions: *never*. To see your sample "working" you can
change your registry settings. If you don't have TweakUI installed, see
<http://www.winguides.c om/registry/display.php/965/for manual
settings change.
et ça continue ... Why not to propose a hammer ?
Naturally it doesn't help much to your future users.
Wonderful help.

--
ASM
Nov 6 '06 #6
VK
It is not relevant to IE but to Windows OS.
>
Again ... !
Again about what?
My IE on my Mac is very lazy with proposed test, very.
IE on Mac is a totally different application running under totally
different OS. Whatever however it does needs a separate investigation
(leaving out that this software is discontinued by producer for more
than year by now).

If we go with "doubleclic k problem" across UA's and OS' I would insist
for some better test case though (++innerHTML just nokes me down every
time I look at it :(
If it is, why doesn't it slow FireFox's clicks ?
"lazy" and "slow" are irrelevant to the situation. It doesn't "slow",
it makes UA to *loose* some clicks because two rapid clicks are
interpreted as an occasional double click so UA get only one click
instead of two.
While IE relies on system click neuristic mentioned in my previous
post, Firefox is trying to keep track of clicks by its own. It allows
it to implement more complicated click sequence listeners, say in XBL
bindings one can use onTripleClick listener.
Why not to propose a hammer ?
I proposed to temporary change registry settings not to solve the
problem, but to demonstrate the root of the problem, that should be
obvious.
Naturally it doesn't help much to your future users.

Wonderful help.
You have a solution to how to disable a registry setting from a
web-page? Please share ;-)

Nov 6 '06 #7
ASM
VK a écrit :
>>Naturally it doesn't help much to your future users.
Wonderful help.

You have a solution to how to disable a registry setting from a
web-page? Please share ;-)
Sure :
onclick="alert( 'Sorry, on work...\nYou can go for a cup of coffe')"

I do not understand at all what your are saying about Windows waiting
eventual 2nd click.
Each time I use a PC Win I have to re learn to double click with a very
rapid speed (comparatively as I do on my Mac)

About IE Mac I know it is not built as a win version (there were
separate teams who coded them) but some commune features have had to be
implemented. It is surprising that mine is also waiting 2nd click as
Windows is supposed to do.
Nov 7 '06 #8
VK
I do not understand at all what your are saying about Windows waiting
eventual 2nd click.
That's OK: a realized non-understanding is the first important step to
the knowledge :-)

In Windows OS (and some other OS) there is a OS-level click filter.
That is a process running on the background of all open applications.
This process - by applying special neuristic and by studying the type
of clicked object - is sorting out occasional double clicks and real
double clicks: for the improved user experience. Say if you double
clicked a submit button: the process presumes (rather reasonably IMHO)
that you meant just to click once, not to submit the form twice but
very quickly :-) Respectively the application gets a refactored event:
single click instead of double click.
Users are making double clicks instead of single ones left and right:
because they accustomed to double click on everything while using their
desktop. Without some doubleclick filter what would be a disaster.
It means - besides everything else - that in your web-applications you
*never* use and never relay on ondoubleclick handlers: they are kept
exclusively for legacy purposes.

In application to HTML button and IE it means that with trained fingers
one can quickly click a button 100 times but the application will get
only 50 single clicks. The system filter will treat your 100 clicks as
50 occasional double clicks and it will refactor them into 50 single
clicks.

If you want to see it in action, below is the code to play with. It is
essentially the OP's code: I just got rid off ++innerHTML and overall
brought it to a more conventional programming style.

Click the button with different speed. Then change your system settings
(must be Windows OS). Manually altering registry can be a dangerous
doing, so I would suggest to use unstead freely available TweakUI util
instead. On TweakUI go to "IE" tab and check off "Detect accidental
double-clicks". As it's a system setting, you'll have to restart
Windows after that. Click the button again to see the changes. Do not
forget to check it on and restart after you are done.

Please note that in any case accesskey (Alt+i / Apple+i) works just
fine with any speed without loosing events. It is because there is not
"ondoublekeypre ss" event so the system doesn't check it for the
correctness.

What workarounds can be suggested Web-wise?
1) For counters with a narrow range of values (0-10 or around) that can
be easily disregarded. "Click masters" will just have to make a couple
or so extra clicks. In any case do not forget to provide accesskey for
the counter.
2) For counters with a larger range of values click counters should not
be used: use sliders instead.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
<html>
<head>
<title>doublecl ick</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var out = null;
var counter = 0;

function init() {
out = document.getEle mentById('out') ;
}

window.onload = init;
</script>
</head>

<body>
<p id="out">0</p>
<p><button type="button" accesskey="i" onclick="
out.innerHTML = ++counter;
"><u>I</u>ncrement</button></p>
</body>
</html>

Nov 7 '06 #9
TC

ASM wrote:
Each time I use a PC Win I have to re learn to double click with a very
rapid speed (comparatively as I do on my Mac)
The doubleclick speed is readily configurable:

Control Panel : Mouse : Double Click Speed

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com

Nov 7 '06 #10

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

Similar topics

9
3446
by: j askey | last post by:
I have a strange bandwidth issue that I have finally tracked down to something fairly specific if anyone has any ideas... Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI Network: DSL line with a Cisco 678 router using NAT and static port maps. Two switches between webserver and Cisco. Problem: Accessing PHP driven site via any computer except the web server is about 20 times slower. I can get fast response on the server
5
2722
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use the appointment collection to populate the calendar control. The performance getting the XML data is fine, but loading the data into the collection is slow. My question/problem is should I be using the collection, a dataset, or something else to...
2
1298
by: EMW | last post by:
Hi, In my datagrid I have the first column set as a buttoncolumn with linkbuttons. In my code I have some line to color the row the cursor is hovering over and what to do when the user clicks on a rowitem in the first column. It will then respond to the OnClick event and do a postback so that the program knows which row was clicked. After that it will retrieve some data what I want to show in a popup modaldialog window.
13
5660
by: Chris | last post by:
I can create Javascript confirm message boxes during page creation, etc adding them to the button attributes (many good posts on this!). But how can I add this event after the button is pressed? I have created an Is_Dirty routine checking for field changes on my page then if the user clicks on the "exit" button I check for Is_Dirty = true and want to ask then "do you want to exit without saving?". It's a code behind where if the value of...
7
1539
by: Tim::.. | last post by:
Can someone please tell me how i execute an onClick event in an asp:Image tag! I want to do the following! Thanks! <asp:Image runat="server" ID="ibtnExpandResource" ImageUrl="../images/user.gif" onClick="Javascript: OnPlusClick(this);" style="cursor:hand;"></asp:Image>
2
2497
by: gnomee2 | last post by:
Hello Everyone, I have a strange problem that I cannot seem to solve. I have two server running Windows 2003 MSSQL on one IIS on the other. Out of the blue I have slow queries that cause asp script timeouts and I cannot figure it out. I have moved some test code to other sites on the server and still have these long delays. I have tried dropping the tables, then the database entirely and restoring and still slow. I run the same code on...
3
2125
by: John | last post by:
Hi I have replaced an ms access app with its vb.net version at a client site. Now the clients keeps complaining about how slow the app response is. The complains they have are for example when app is minimised and then trying to maximise it after a while takes a while for app to get maximised. Also form painting of controls is slow and app is generally slow in terms of response to user clicks. I am using Infragistics controls and my...
2
3014
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the length. <html> <head> <title>Rapid Blocking Interface</title> <style> .calendar {
0
8428
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
8851
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
8748
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
8531
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,...
1
6181
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
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
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...
1
2754
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 we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.