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

iframe event activity/timeout (remote domain)

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!!!

Nov 13 '06 #1
7 8978
ic********@hotmail.com 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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 13 '06 #2

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?

Nov 14 '06 #3
ASM
ic********@hotmail.com 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.c ounter);}"
blah blah >
<iframe onload="parent.countTime(new Date());"
blah blah >
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 14 '06 #4
ic********@hotmail.com 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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 14 '06 #5
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?!?

Nov 15 '06 #6
ASM
ic********@hotmail.com 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?)
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 15 '06 #7
ASM wrote:
ic********@hotmail.com a écrit :
<snip>
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).

Nov 15 '06 #8

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

Similar topics

4
by: Robert Oschler | last post by:
I have a comparison web page that has several iframes that contain documents from external domain web sites. Some of the web sites are "trusted". If they want to change the top level document...
3
by: Bob | last post by:
I'm a total newbie at Javascript, but a programmer for over 20 years... so, my plans may be bigger than they are possible. I'm trying to set with Javascript the value of a form field... easy...
2
by: herc777 | last post by:
Is it possible for javascript to inspect the contents of an iframe or is it an external object? <iframe id="myiframe" src=""> <script> document.getElementById.myiframe.src =...
2
by: Nelson | last post by:
Here is the discussion that is already discussed that I am looking for. After visiting the link below I am getting the following code. My question is in which client side script event I can set the...
3
by: Timo | last post by:
In javascript code on MyPage.aspx, I set a hidden IFRAME's source url: myframe.location.href = 'someotherpage.aspx'; If the session has timed out, preventing someotherpage.aspx from being...
21
by: javainfo | last post by:
How can i refresh IFRAME and load data through AJAX?
2
by: buu | last post by:
how could I handle session timeout event in asp.net? I would like to perform some action on database when it happens
7
by: Tom Cole | last post by:
IFrames have been used by years for people to accomplish many of the tasks the XMLHttpRequest does for them now...I unfortunately am late in the game and XMLHttpRequest was already out there by the...
1
by: LizF | last post by:
Hi, I have an iframe with a site from a different domain. The iframe src contains links that I would like to open in a new window when clicked. Unfortunately, I can't get the target.href of the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.