New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

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


Post Reply New Thread Subscribe

 
Thread Tools
lleoun

 
Member Since: May 20, 2008
Posts: 2
lleoun is on a distinguished road

lleoun is offline
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!
QUOTE Thanks
blbirajdar

 
Member Since: Oct 03, 2011
Posts: 1
blbirajdar is on a distinguished road

blbirajdar is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« can i use MY web space for MY Cloud | Looking for a easy to use web host »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Safari problem - won't reopen windows from last session Dionosaur OS X - Apps and Games 11 01-06-2012 08:26 PM
Switch to Safari: A look at Safari for Windows (Personal blog post) goobimama Schweb's Lounge 4 03-22-2008 12:56 PM
safari won't open after using safari speed youthieguy OS X - Apps and Games 3 12-26-2007 12:59 PM
.11 update issues KB3GZW OS X - Operating System 36 11-24-2007 02:45 PM
Safari is the browser to use on OS X!! Computer.Geek OS X - Apps and Games 14 04-29-2005 03:01 PM

All times are GMT -4. The time now is 01:57 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?