0

I have a page in flex and on this webpage I have an iframe. I want to add code in javascript, that will detect when the page in the iframe changes (for example, if someone clicks on a link within the iframe) and I want to know what the URL of the new page in the iframe is.

Is there any way to do this?

1 Answer 1

4

There is no way to do this if the pages in the iframe are on a different domain than the parent page due to the Single Origin Policy.

If they are on the same domain, and you know which pages are being called in the iframe, it would probably be easiest to give each page in the iframe an onload event that informs the parent page of the changed URL.

For code, you would have to give more detail on what the parent page is supposed to do with this information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.