Where Should window.parent.location Open?

Ask for help about NoScript, no registration needed to post
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Where Should window.parent.location Open?

Post 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>
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Where Should window.parent.location Open?

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Post Reply