Is there any way you can fire a function when a iframe has changed its page (load function), without having to add anything to the iframe content?
Thank you in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming the iframe contents are from another origin, in which case the answer is no. Browsers won’t tell you the current URL of a child iframe unless its same-origin, so I don’t think they’ll fire an event when it changes.
Here’s a demo which recognises when the first load event takes place, but doesn’t log any subsequent page changes:
http://jsfiddle.net/GPh6H/