iframe event activity/timeout (remote domain)

I

icemtn0611

Is there a way for javascript to detect activity in a child iframe that
references a foriegn domain? i.e. It appears that security
restrictions prevent events from propagating to the parent.

I'm simply interested in whether there is user activity in the iframe
... I don't really need the events. I need to timeout the iframe upon a
period of inactivity.

I thought I might overlap a frame over the iframe, but events don't
pass thru .. or am i missing something?

Any thoughts or pointers would be appreciated!!!
 
R

Randy Webb

(e-mail address removed) said the following on 11/13/2006 5:03 PM:
Is there a way for javascript to detect activity in a child iframe that
references a foriegn domain?
No.

i.e. It appears that security restrictions prevent events from
propagating to the parent.
Correct.

I'm simply interested in whether there is user activity in the iframe
.. I don't really need the events. I need to timeout the iframe upon a
period of inactivity.

You will have to have the foreign domain time it out.
I thought I might overlap a frame over the iframe, but events don't
pass thru .. or am i missing something?

You aren't missing anything.

If you could tell what "activity" was going on in a foreign domain then
I could put your bank site in a 100% IFrame and do what I wanted - it's
a security violation to even try.
 
I

icemtn0611

Security is fine. I don't need "what" is happening, I just want to
know if somethink "is" happening. Are there any stats that the window
maintains or parent doc maintains?

Any other thoughts?
 
A

ASM

(e-mail address removed) a écrit :
Is there a way for javascript to detect activity in a child iframe that
references a foriegn domain? i.e. It appears that security
restrictions prevent events from propagating to the parent.

I'm simply interested in whether there is user activity in the iframe
.. I don't really need the events. I need to timeout the iframe upon a
period of inactivity.


<iframe onload="function(){parent.counter++;alert(parent.counter);}"
blah blah >


<iframe onload="parent.countTime(new Date());"
blah blah >
 
R

Randy Webb

(e-mail address removed) said the following on 11/14/2006 8:33 AM:
Security is fine.

It may be for what you are wanting to do. But to allow you to do what
you want to do, they have to allow other things as well that they simply
won't allow.
I don't need "what" is happening, I just want to
know if somethink "is" happening.

Not with client side script in a default security environment.
Are there any stats that the window maintains or parent doc maintains?

Not on foreign child documents.
Any other thoughts?

Lots.
 
I

icemtn0611

ASM,

Your onload idea is a step in the right direction .. it does capture
get & post activity. Unfortunately, it doesn't appear to see ajax
traffic, and of course it isn't aware of any mouse/keyboard activity.

It's a good thought and may suffice for some developer's needs.

Thanks for the input!

Any other thoughts .. anyone?!?
 
A

ASM

(e-mail address removed) a écrit :
ASM,

Your onload idea is a step in the right direction .. it does capture
get & post activity. Unfortunately, it doesn't appear to see ajax
traffic, and of course it isn't aware of any mouse/keyboard activity.

I think onload is the alone possibility because you cant get (or set
attributes to) elements of a page coming from another domain (displayed
in iframe).
It's a good thought and may suffice for some developer's needs.

You can only follow activity of your own domain.

In what activity of foreign domains could be of some interest ?
(your are not their web master, no?)
 
I

icemtn0611

ASM said:
(e-mail address removed) a écrit :
In what activity of foreign domains could be of some interest ?
(your are not their web master, no?)
<snip>

Again, I am looking to timeout the iframe .. thus, I am interested in
any user activity (mouse/keyboard).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top