473,395 Members | 1,484 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,395 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 8993
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
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...

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.