Safari doesn't get opener.parent.location.href

Joined
May 20, 2008
Messages
2
Reaction score
0
Points
1
Hi all,

Let's say I have the following:

Granddad.htm (An html page with an iframe containing Dad.htm)
|
Dad.htm (the page contained in Grandad.htm's iframe)
|
Son.htm (an iframe inside Dad.htm containing Grandson.htm)
|
Grandson.htm (the page contained in Son.htm's iframe that has a link to a popup which shows Greatgrandson.htm)
|
Greatgrandson.htm (the pop up page with several links)

I want to open the Greatgrandson.htm links in Dad.htm

So in Greatgrandson.htm I have:

Code:
<script language="javascript">
 function loadinparent(url){
  opener.parent.location.href = url;
  self.close();
        }
</script>
</head>
<body>
<a href="javascript:loadinparent('http://www.apage.com', false);" > Open a page</a>


And this is working great for all browsers except for Safari .. Please help I need it working also on Safari!!
Thanks in advance!
 
Joined
Oct 3, 2011
Messages
1
Reaction score
0
Points
1
Resolved

Code:
<script language="javascript">
 function loadinparent(url){
  opener.parent.location.href = url;
  self.close();
return false; :Shouting:
        }
</script>
</head>
<body>
<a href="javascript:loadinparent('http://www.apage.com', false);" > Open a page</a>

You need to specify the 'return false;' in this code or wherever opener.parent.location.href is used. This is the safari specifc fix. Not required for other browsers.

I have updated your code. I faced the same issue in the Adam's browser i.e. Safari. Its the most non-standard browser on the planet. It works only for Apple products.

So next time you want to visit google , use any other browser other than Safari, otherwise you may land on to Bing. :Lips-Are-Sealed:
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top