473,625 Members | 3,093 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.l ocation.href but it didnt work because
I have frames in my secondary window...

Thanks
Jul 20 '05 #1
3 2717
"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.loca tion.replace("m yNewURL.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.h tm" target="_blank"
onclick="opener .frame13.locati on=this.href;
return false;
">Page 007</a>
I tried to used window.opened.l ocation.href
* window.opener.M yFrame.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.loca tion.href = link

it worked perfectly.

"Dave Anderson" <GT**********@s pammotel.com> wrote in message news:<ej******* *******@TK2MSFT NGP12.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.loca tion.replace("m yNewURL.asp")

Jul 20 '05 #4

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

Similar topics

1
2161
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 b) redirect this "semi" parent window to another URL. I could name the semi-parent window something, if that would help. All the ideas I've seen online have to do with calling back to parent windows, but they don't work for me.
6
1200
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 bottom of the window. Is there any other options that I could specify while creating window?
14
11068
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 window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
2
1784
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 basically used ImageButton server control. The problem is because I have used a server control with runat="server",the parent page is posted back and even though the window opens up,the focus gets set to the parent window. What I want is,the new window...
2
1360
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 Form2 and the second calls Form3 The code follows:-
3
3473
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:;" onclick="opener.location.href='http://www.test.com/'">Link name</a>
2
1327
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 existance of the parent window and if it does not exist open a new one ? thanks to all
1
3699
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 tried doing some workaround using window.open() but not getting the calendar in new window. <html> <head> <script language="JavaScript">
1
4476
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 parent window name is "main". A made a link like this in the child-site: <a href="new_address.html" target="main" class="about" onclick="javascript:main.location='new_address.html';self.close();"> change and close </a>
0
8259
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8192
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8696
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8358
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7188
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4090
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.