473,395 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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,
Nov 17 '05 #1
1 10414

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" <yo******@yahoo.com> wrote in message
news:8a**************************@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,

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
3
by: Farooq Karim | last post by:
Greetings; I am unable to solve this problem; I hope someone will come up to show his brilliance. From my web page I open another link in another browser window. That new window is composed...
3
by: sentinel | last post by:
Hi all, I'm trying to reload a frame from a pop-up, but really cannot figure this out. Within my index.htm file, I make a link to call a pop-up frame with a javascript function that calls the...
10
by: Thad | last post by:
Any javascript I could try on this? I've got a popup window on my site with the browser chrome removed. Another site's gone ahead and done a popup to my same .html page. The visitor to that site...
2
by: JPL Verhey | last post by:
(i hope somebody (else) will read and have an idea! Thnx) Hi, With a script in a popup window, I want to check if certain content is present in a page loaded into the frame "main" of the...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
4
by: Kenneth | last post by:
Hi, I have two forms, parentForm and childForm. parentForm has a button(btn1) and a grid. childForm has a couple of textboxes and a button. The button on parentForm opens a new window of...
3
by: alison | last post by:
I am trying to redirect the parent page when the user clicks an html button in an aspx page by using the javascript: window.opener.location.href="EditOrders.aspx"; This works fine on IE for...
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.