473,498 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opening link in parent window

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 of two frames. I have a <a
href="....."> link on the second frame of that window. What I want is
that when user clicks on the link in the new window's second frame,
the response should open in the original browser window that opened
this secondary window(which is made of two frames). How can I do it?I
hope i have explained my problem.

I tried to used window.opened.location.href but it didnt work because
I have frames in my secondary window...

Thanks
Jul 20 '05 #1
3 2695
"Farooq Karim" wrote:

From my web page I open another link in another browser window. That
new window is composed of two frames. I have a <a
href="....."> link on the second frame of that window. What I want is
that when user clicks on the link in the new window's second frame,
the response should open in the original browser window that opened
this secondary window(which is made of two frames). How can I do it?


You can do it a couple of ways. As Martin suggested, you can use named
windows. That is probably the preferred method.

If you opened the second window with window.open(), you can use [top.opener]
as a reference to the original window. In this case, [top] refers to the
window that contains the frameset, and that window has an [opener] property
containing a reference to the original:

top.opener.location.replace("myNewURL.asp")
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 20 '05 #2
@SM
Farooq Karim a ecrit :

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 of two frames. I have a <a
href="....."> link on the second frame of that window. What I want is
that when user clicks on the link in the new window's second frame,
the response should open in the original browser window that opened
this secondary window(which is made of two frames). How can I do it?I
hope i have explained my problem.
Glou glou glou ...
Glup glup glup ...

- 1st window : frame11 - frame12 - frame13
- 2nd window : frame21 - frame22

- window2-frame22 : link to window1-frame13

<a href="page007.htm" target="_blank"
onclick="opener.frame13.location=this.href;
return false;
">Page 007</a>
I tried to used window.opened.location.href
* window.opener.MyFrame.location.href *
^^^^^^ ^^^^^^^
but it didnt work because
I have frames in my secondary window...


Not only ... *opened* is not correct

*opener* works only if it refers to a window in which
a page have a the JS *window.open()* that opened the
new window that use this *opener*

glup glup glup ... :-)

-- ----
@SM
move away *OTEZ-MOI* from my reply url
Jul 20 '05 #3
Thanks Dave!

I just used

top.opener.location.href = link

it worked perfectly.

"Dave Anderson" <GT**********@spammotel.com> wrote in message news:<ej**************@TK2MSFTNGP12.phx.gbl>...
"Farooq Karim" wrote:

From my web page I open another link in another browser window. That
new window is composed of two frames. I have a <a
href="....."> link on the second frame of that window. What I want is
that when user clicks on the link in the new window's second frame,
the response should open in the original browser window that opened
this secondary window(which is made of two frames). How can I do it?


You can do it a couple of ways. As Martin suggested, you can use named
windows. That is probably the preferred method.

If you opened the second window with window.open(), you can use [top.opener]
as a reference to the original window. In this case, [top] refers to the
window that contains the frameset, and that window has an [opener] property
containing a reference to the original:

top.opener.location.replace("myNewURL.asp")

Jul 20 '05 #4

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

Similar topics

1
2142
by: DROdio | last post by:
I have a parent window that calls a popup, but via a semi convoluted process where it seems to lose its parent designation. I want that pop up to have a link which will a) close the pop up and...
6
1189
by: Johnny | last post by:
Hi, I am trying to open new window that only has title bar. I specified whatever options I could "location=no,menubar=no,status=no,toolbar=no" but in FireFox status bar is still shown at the...
14
11016
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
2
1771
by: Keshav Gadia | last post by:
Hi, I am an ASP.net newbie. I am writing a user control that is made up of datagrid with one of the columns opening a new window to display some details on click of the set image. I have...
2
1355
by: Peter W Johnson | last post by:
Hi Guys, I have a problem opening a child window within a parent window when passing a variable between two child windows. I have the parent window setup with two menuitems. The first calls...
3
3463
by: rick2910 | last post by:
Hello, I have a problem with a popup. In this popup (child) are several links. I want these links to open in A NEW parent window. Code: <a href="javascript:;"...
2
1319
by: Mel | last post by:
My main window pops a "remove control" window from which user clicks on links that are displayed in parent window. users however have a tendency of closing the parent window. How can i check the...
1
3692
by: abhishekbrave | last post by:
The code below is opening a calendar on mouse over in the same window. I need the calendar to be opened in new window. Have to fulfill this requirement urgentely so posting the whole code here. I...
1
4447
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The...
0
7126
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
7210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7381
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...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4916
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
659
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.