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

iframe and onmousemove

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 true;" does not work as
expected.

-The function resetCounter set back a counter to eg 100.
-with setTimeOut I can call a function wich counts the counter down
=If no mousemove happens the counter will reach zero and I can
reload the inital
frame with
frames["mainFrame"].location.href="firstPage.html"

It works if I say in the body tag of firstPage.html:
onMouseMove="parent.resetCounter();"
but then I have to modify each html-page, with is shown in my iFrame.
That is not very nice.

I tried the dom-concept of eventhandling, but I get always the same
problem. If moving over
the iframe I can't catch any event.

Target-Browser ist Firefox, it would be enough, if somebody has a hint
how I could get
Information about the mouse position at an arbitrary point of time,
because in this case
I could check the mouse movement in the function which is periodically
called by setTimeOut

Thanks
Karsten

Aug 3 '06 #1
1 4411
k.******@gmx.de wrote:
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 true;" does not work as
expected.

-The function resetCounter set back a counter to eg 100.
-with setTimeOut I can call a function wich counts the counter down
=If no mousemove happens the counter will reach zero and I can
reload the inital
frame with
frames["mainFrame"].location.href="firstPage.html"

It works if I say in the body tag of firstPage.html:
onMouseMove="parent.resetCounter();"
but then I have to modify each html-page, with is shown in my iFrame.
That is not very nice.

I tried the dom-concept of eventhandling, but I get always the same
problem. If moving over
the iframe I can't catch any event.

Target-Browser ist Firefox, it would be enough, if somebody has a hint
how I could get
Information about the mouse position at an arbitrary point of time,
because in this case
I could check the mouse movement in the function which is periodically
called by setTimeOut

Thanks
Karsten
Yeah I've had trouble trying to get a parent frame to see the mouse
moving on an iframe. You can either overlay it (the iframe) with a
transparent div (which is in the parent frame), or write the
onmousemove code in the document of the child frame, if it's yours.

hope this helps.
---
http://darwinist.googlepages.com/htmldesktop.html
(lots of working examples)

Aug 5 '06 #2

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

Similar topics

2
by: madmike | last post by:
Hi, I have an iframe with some javascipt that gets the mouse x and y position like this: //inside the iframe's onmousemove call back funciton xMousePos = window.event.clientX +...
2
by: Axel Schick | last post by:
Hello everybody! I encountered a strange behavior when trying to read the scrollTop propery of the <body> element from inside an iFrame: <body onmousemove = "window.status =...
5
by: Ravi | last post by:
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...
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...
4
by: lefrison | last post by:
Hi i am generating a div in my window which moves with my cursor on the screen. this works fine until i try to move the cursor over an iframe in the window. if i use the z-index the div moves in...
3
by: Luongo | last post by:
Hi, I need to change the value of a text input (onmousemove) in the parent document from an iframe, based on what an iframe variable is. I tried this code along with several others but can't seem...
15
hsriat
by: hsriat | last post by:
<body onmousemove="moveMe()"> This function can also be called as document.onmousemove = function {moveMe();}; Similarly what can be done for onmousemove="moveMe(event)" ?
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.