K
k.roemke
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
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