Results 1 to 2 of 2
  1. #1
    Safari doesn't get opener.parent.location.href

    Member Since
    May 20, 2008
    Posts
    2
    Safari doesn't get opener.parent.location.href
    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!

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

    Member Since
    Oct 03, 2011
    Posts
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Safari - 'Open Location' greyed out
    By Mikeo1938 in forum OS X - Operating System
    Replies: 10
    Last Post: 03-25-2013, 05:49 AM
  2. Location doesn't update in iOS6
    By manga in forum iOS and Apps
    Replies: 1
    Last Post: 10-12-2012, 03:00 AM
  3. Safari's Location Bar
    By shahvikram123 in forum Switcher Hangout
    Replies: 9
    Last Post: 02-10-2008, 11:31 AM
  4. Copying the location of an image from a webpage (Safari)
    By MrJoshua in forum OS X - Apps and Games
    Replies: 2
    Last Post: 11-20-2006, 02:52 PM
  5. safari location bar
    By cjay in forum Switcher Hangout
    Replies: 1
    Last Post: 12-19-2005, 08:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •