I am creating a popup window in a private web application. The popup runs a server-side proxy script, which allows users to 'surf' other websites through the proxy. I need to detect when the user clicks a link which results in the user surfing outside of the proxy script. If this happens, I need to pass the external URL which the user is at back into the proxy script as a querystring.
So user is surfing through proxy: http://www.mywebapp.com/proxy?url=http://www.otherdomain.com
User clicks a link which proxy has not 'fixed' - User ends up at http://www.otherdomain.com/page2.html
Parent window needs to detect this URL, and redirect the popup back to
I am detecting when the URL changes in a popup. This is not the problem.
From the parent window, I can monitor the popup's URL using myPopupName.location.href
Once the popup leaves mywebapp.com, the parent is unable to monitor the URL of the popup so it can redirect back into the proxy? - I get permission denied when I try to read myPopupName.location.href
Any ideas or workarounds appreciated.