•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,589 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,593 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4852 | Replies: 1
![]() |
Hi,
I have popup window containing links called from the parent. If someone clicks a link in the child window (popup) I want it to open in the parent window (original window).
Is this possible and can somebody please show me what script to add to child window to do it please?
My popup (so you can see) go here
http://herproom.5.forumer.com/index.php?
and click the link 'Veiw Active Topics' near the top. popup has green snake background.
Thanks
Edit: I forgot, I cannot access/alter targets of links in the popup e.g target="_something"
so the code must automatically make ANY link in the child window open in the parent.
I have popup window containing links called from the parent. If someone clicks a link in the child window (popup) I want it to open in the parent window (original window).
Is this possible and can somebody please show me what script to add to child window to do it please?
My popup (so you can see) go here
http://herproom.5.forumer.com/index.php?
and click the link 'Veiw Active Topics' near the top. popup has green snake background.
Thanks
Edit: I forgot, I cannot access/alter targets of links in the popup e.g target="_something"
so the code must automatically make ANY link in the child window open in the parent.
Last edited by Inny : Nov 2nd, 2007 at 11:56 pm.
Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
W. C. Fields
Ps in the child window, please note the google link, this opens in the parent window. What I wish to do is assign the same attribute 'loadinparent' to all (a) elements in the child page.
for the google link, i have used
with
How can assign the 'loadinparent' attribute to the base href or to all link elements in the child page?
i tried this...
since all links in the child start with this. it didnt work. clicking the links spawns a new window.
for the google link, i have used
<SCRIPT LANGUAGE="JavaScript">
<!--// Hide script from non-javascript browsers.
// Load Page Into Parent Window
// Version 1.0
// Last Updated: May 18, 2000
// Code maintained at: http://www.moock.org/webdesign/javascript/
// Copy permission granted any use provided this notice is unaltered.
// Written by Colin Moock.
function loadinparent(url){
self.opener.location = url;
}
//-->
</SCRIPT>with
<a href="javascript:loadinparent('http://www.google.com.au', true);">Google</a>How can assign the 'loadinparent' attribute to the base href or to all link elements in the child page?
i tried this...
<base href="http://herproom.5.forumer.com/index.php?" target="loadinparent; true">
since all links in the child start with this. it didnt work. clicking the links spawns a new window.
Last edited by Inny : Nov 3rd, 2007 at 9:39 am.
Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
W. C. Fields
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax apple asp cocoa computer dell developer development drivers enterprise firefox framework games graphics home ibm intel internet java links linux microsoft microsystems mozilla msdn news next office open open source open-source opengl openoffice operating programming red hat site software source sql step sun super system ubuntu vista web wesnoth windows xp
- Parent/Child Windows References (JavaScript / DHTML / AJAX)
- Hijack Log IE 6.0 will not open certain links (Viruses, Spyware and other Nasties)
- IE version 6 won't open links in new windows (Web Browsers)
- Calling function in a child window from main parent window (C#)
- IE cannot open links in new window (Web Browsers)
- Can't open links in Hotmail (Web Browsers)
- IE6 won't open links: Hijack This Log (Viruses, Spyware and other Nasties)
- Dialog Box alongwith Form (Visual Basic 4 / 5 / 6)
- IE 6 won't open links (Web Browsers)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: How do I make my window the size of the Image?
- Next Thread: ajax won't work without the www in url


Linear Mode