I am trying to set up an app which gets the URL of a webpage however the webpage in the iframe is an external site. Based on the URL, it will trigger something to load on the page for the user.
I have tried using the following code:
$("iframe").contents().get(0).location.href;
However, the return result is about:blank
. I have full access to both the local and the external server if I need to make a change to them to get this working.
If I use the above code where the iframe is loading a page on the same server, it works perfectly fine.