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

L

Leon

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,
 
B

Boban Dragojlovic

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">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top