window.opener.location.href doesn't work in frame

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default window.opener.location.href doesn't work in frame

    From parent windows, I have created a popup windows that comprises two
    frames.
    When I have clicked a link button in one of the frames, I would like
    to redirect the parent windows to somewhere.
    So I did
    ------------------------------------------------------------------
    <a href='#' onclick='window.opener.location.href
    =""http://www.google.com"";'>Click here</a>
    ------------------------------------------------------------------

    but it didn't work.
    Without frame, it works. So I presume it has something to do with
    frame.
    Could you help me?

    Thanks in advance,
    Leon Guest

  2. Similar Questions and Discussions

    1. Child window property window.opener null after postback
      I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the...
    2. [PHP] referer on javascript location.href
      please excuse me, there is tonnes on google :\
    3. referer on javascript location.href
      hi there, i have a delete button which uses a javascript location.href to switch to a delete action in the same script as the form action handles...
    4. Refreshing or Redirecting Opener Window
      Is it possible to redirect or refresh the contents of Page1 from within Page2 where Page2 was opened by Page1?
    5. RePosting window.opener windows to server.
      Hi , I know that this is something belongs to IE but , I think sometimes asp.net developers encounter this problem. Sometimes we need to repost...
  3. #2

    Default Re: window.opener.location.href doesn't work in frame


    Instead of script, just set the "target" attribute of the anchor to "_top"

    <a href="#" target="_top">

    That tells is to navigate the "top" frame.

    If the parent is NOT the top frame (multiple nested frames), then set target
    to the name of the frame that you want to navigate

    <a href="#" target="parent_frame_name">


    "Leon" <yootaeho@yahoo.com> wrote in message
    news:8a817d39.0306240026.59cc46c5@posting.google.c om...
    > From parent windows, I have created a popup windows that comprises two
    > frames.
    > When I have clicked a link button in one of the frames, I would like
    > to redirect the parent windows to somewhere.
    > So I did
    > ------------------------------------------------------------------
    > <a href='#' onclick='window.opener.location.href
    > =""http://www.google.com"";'>Click here</a>
    > ------------------------------------------------------------------
    >
    > but it didn't work.
    > Without frame, it works. So I presume it has something to do with
    > frame.
    > Could you help me?
    >
    > Thanks in advance,

    Boban Dragojlovic Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139