473,566 Members | 3,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="re setCounter();re turn 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="pa rent.resetCount er();"
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 4464
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="re setCounter();re turn 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="pa rent.resetCount er();"
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
16458
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 + document.body.scrollLeft; yMousePos = window.event.clientY + document.body.scrollTop; This gets the x and y position inside the iframe. But what I want is
2
9043
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 = document.body.scrollTop;"> allways reports "0" , even if i scroll down in the iframe. Is this a known bug?
5
5499
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 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...
5
2249
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 move the mouse. When I am moving mouse over the form it fires. But if mouse is over any control (textbox, listbox
4
10612
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 front of the iframe, but the moment the cursor is inside the iframe the div stops. i use the following code as javascript: " <script...
3
5366
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 to get it to work: (in the iframe) window.parent.points.mapvalues.value = tempX; Any help would be appreicated. Thanks....
15
2294
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
3709
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 OnMouseMove event. Anybody know why? My mouse is moving on a Form with a Picturebox on it. protected override void OnMouseMove(MouseEventArgs e) ...
0
7673
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...
0
8109
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...
1
7645
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...
0
7953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5485
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...
0
5213
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...
0
3643
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...
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
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...

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.