Need help with html and javascript.
MikeJMS8910

So currently I am making this thing with iframe so that you can go to a site but with a different URL. But I am having trouble with something. Every time the page changes from a site it could be on I need it so that it will tell me that the URL of the iframe is displaying has changed. So how can I do this? To see if an iframe has changed. I tried to use src but that doesn't update when the frame is changed.

You are viewing a single comment. View All
xfinnbar

"For security reasons, you can only get the url for as long as the contents of the iframe, and the referencing javascript, are served from the same domain. As long as that is true, something like this will work:

If the two domains are mismatched, you'll run into cross site reference scripting security restrictions." - kkyy on StackOverflow: https://stackoverflow.com/questions/938180/get-current-url-from-iframe