Page 1 of 1

Where Should window.parent.location Open?

Posted: Thu Oct 01, 2009 8:17 pm
by therube
Where Should window.parent.location Open?

If a site is not Allowed, where should window.parent.location open?

URL: http://www.sandboxie.com/

Right hand side, under '30 September 2009', there is a 'Download Sandboxie' link.

If sandboxie is not Allowed, the download page opens in that frame on the right side.
If sandboxie is Allowed, then the existing page is replace with the download page.

Is that expected behavior?

Code: Select all

<li> Version 3.40 of Sandboxie is now available for download.  <a href="/#" onclick="window.parent.location = 'http://www.sandboxie.com/index.php?DownloadSandboxie'; return false;">Download Sandboxie</a>.
</li>

Re: Where Should window.parent.location Open?

Posted: Thu Oct 01, 2009 9:19 pm
by Giorgio Maone
therube wrote:

Code: Select all

<li> Version 3.40 of Sandboxie is now available for download.  <a href="/#" onclick="window.parent.location = 'http://www.sandboxie.com/index.php?DownloadSandboxie'; return false;">Download Sandboxie</a>.
</li>
If sandboxie is not Allowed, the download page opens in that frame on the right side.
If sandboxie is Allowed, then the existing page is replace with the download page.

Is that expected behavior?
Yes it is.
If JavaScript is disabled, "Attempt to fix JavaScript links" extracts the URL from the "onclick" attribute and puts it into the "href" attribute.
Therefore when you click the link, it's followed like a normal link and opened in the same frame, since it has no "target" attribute.