Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iframe activity #5

Closed
rharding-lightbox opened this issue Mar 24, 2014 · 6 comments
Closed

iframe activity #5

rharding-lightbox opened this issue Mar 24, 2014 · 6 comments
Assignees

Comments

@rharding-lightbox
Copy link

Is there anyway to account for activity in an iframe in the same domain? We use it to display older aspx/asp content in our MVC site.

@JillElaine
Copy link
Owner

It should work. The script does work across multiple browser windows within the same domain. If it is not working, check that you've loaded the loaded the idleTimeout script for your older content.

@rharding-lightbox
Copy link
Author

I was hoping to handle it all in the parent. Is that possible?

From: JillElaine [mailto:notifications@github.com]
Sent: Tuesday, March 25, 2014 9:22 AM
To: JillElaine/jquery-idleTimeout
Cc: Roy Harding
Subject: Re: [jquery-idleTimeout] iframe activity (#5)

It should work. The script does work across multiple browser windows within the same domain. If it is not working, check that you've loaded the loaded the idleTimeout script for your older content.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-38521566.

@JillElaine
Copy link
Owner

In the parent, after you open the iframe, use jQuery to add the necessary script to the iframe.

You'll need to add the 4 dependent script libraries to the iframe, jquery.js, jquery-ui.js, store.js & jquery-idleTimeout.js, and then call the idleTimer function in a 'document ready' function. Use the index.html as an example. https://github.com/JillElaine/jquery-idleTimeout/blob/master/index.html

The syntax is tricky. Please see this stackoverflow discussion http://stackoverflow.com/questions/18369410/how-to-add-javascript-code-into-existing-iframe-using-jquery and this jsfiddle: http://jsfiddle.net/WsCxj/

@JillElaine
Copy link
Owner

I've added detection of activity within iframes from the same domain to jquery-idleTimeout-iframe.js.

You can see a demonstration of this script here: http://jillelaine.github.io/jquery-idleTimeout/iframe-demo.html

I appreciate feedback. Thank you.

@JillElaine
Copy link
Owner

Added iframe activity detection. Closes issue #5.

@rharding-lightbox
Copy link
Author

works great!! Thanks :)

@JillElaine JillElaine self-assigned this Apr 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants