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

onmousemove event fires without mouse movement

In IE (tested IE6 on W2k&WXP) onmousemove event appears to fire
continually
when mouse is over the document and not moving or touched at all, even
when
mouse is physically detached from the computer. Same page on Firefox
works
well (event fires only when mouse moves, not when it is static on the
document). Seems a bug, doesn't it? Anyone knows something about this
or a
solution?
Used code:
<script: JavaScript>
document.onmousemove=doit
function doit()
{alert()}
</script>
gives continuous alerts as long as mouse is over document

Oct 17 '05 #1
5 5475

Ravi wrote:
In IE (tested IE6 on W2k&WXP) onmousemove event appears to fire
continually
when mouse is over the document and not moving or touched at all, even
when
mouse is physically detached from the computer. Same page on Firefox
works
well (event fires only when mouse moves, not when it is static on the
document). Seems a bug, doesn't it? Anyone knows something about this
or a
solution?
Used code:
<script: JavaScript>
document.onmousemove=doit
function doit()
{alert()}
</script>
gives continuous alerts as long as mouse is over document


I would guess that the clearing of the alert box is triggering a mouse
move event.

Try:

function doit(){ window.status=new Date().getTime(); }

--
S.C.

Oct 17 '05 #2
The other function you suggested also does the same. The status bar
gets updated with the time.
--
Ravi

Oct 18 '05 #3
Ravi <ra********@gmail.com> wrote in message news:11**********************@o13g2000cwo.googlegr oups.com...
The other function you suggested also does the same. The status bar
gets updated with the time. <script: JavaScript>


I'm surprised that worked at all:

<script type='text/javascript'>

Can you show the entire code?

--
S.C.
Oct 18 '05 #4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Example for the onmouseover Event</TITLE>
<SCRIPT>
var counter = 0;
function fnTrackMouse(){
counter++;
window.status="Coords: (" + event.clientX + ", " + event.clientY + ")
" + counter;
}
</SCRIPT>

<!-- SAMPLE_STYLE_END -->
</HEAD>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000"
onmousemove="fnTrackMouse()">
<BLOCKQUOTE CLASS="body">

<H1>onmousemove Sample</H1>
<P>This sample demonstrates the use of the <b>onmousemove</b> event to
monitor the location of the mouse cursor in a specified region of the
page.
When the mouse is moved over the gray <b>DIV</b>, the yellow
<b>SPAN</b> is updated with the mouse location values obtained from the
<b>clientX</b> and <b>clientY</b> properties on the <b>event</b>
object.</P>

</BLOCKQUOTE>
</BODY>
</HTML>

I have the tried the same example at my office and my home. It behaves
as expected at home(winxphome ie sp2). at office(winXP professional ie
sp2) the counter in the status bar gets incremented with out the
mousemove.

Thanks,
Ravi

Oct 18 '05 #5
Ravi <ra********@gmail.com> wrote in message news:11**********************@g14g2000cwa.googlegr oups.com...
<SNIP>
I have the tried the same example at my office and my home. It behaves
as expected at home(winxphome ie sp2). at office(winXP professional ie
sp2) the counter in the status bar gets incremented with out the
mousemove.

I can only conclude that your office computer is running some other process
(known to you or otherwise) that is interfering with the browsers mouse handling.

--
S.C.

Oct 18 '05 #6

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

Similar topics

0
by: Luc The Perverse | last post by:
I admit, I haven't used Dot.Net, so maybe this question applies to either the 2005 Beta or to Dot Net as well. I wanted to create a Mouse Movement Entropy random function generator dialog, a...
2
by: Mariusz | last post by:
Hello, I'm trying to do drag'n'drop where You can see elements that You are dragging (table rows exactly) but I have small problem. Here is code sample var move = false; function...
9
by: VK | last post by:
My original idea of two trains, however pictural it was, appeared to be wrong. The truth seems to be even more chaotic. IE implements its standard down-up model: any mouse event goes from the...
3
by: Logan Mckinley | last post by:
I need to be able to detect mouse movement even when it is not over my application. I can get the mouse cords using MousePosition but I am not sure if there is an event that hits my program when...
5
by: Iouri | last post by:
I have added the Overrides proc onMouseMove like Protected Overrides Sub onMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs) ........... End Sub This proc supposed to fire when I...
8
by: davefromalbury | last post by:
I'm trying to create a basic slider and I'm having absolutely no luck in firefox. Could someone please offer some hints as to what could be wrong? I think it's to do with the focus change upon...
1
by: k.roemke | last post by:
Hello! After a longer time I want to do some javascript again. Task: set content of an iframe to the origin page if the mouse is not moved Problem: <iframe onmousemove="resetCounter();return...
1
by: EddieT | last post by:
Hi, I am planning to override the mouse movement to discrete steps so that i can get a coarser movement of the mouse for easier click of objects. However, I am not getting any trigger in the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
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...

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.