User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Oct 2005
Posts: 236
Reputation: Inny is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
Inny's Avatar
Inny Inny is offline Offline
Posting Whiz in Training

open links in parent window (from child)?

  #1  
Nov 2nd, 2007
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.
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2005
Posts: 236
Reputation: Inny is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
Inny's Avatar
Inny Inny is offline Offline
Posting Whiz in Training

Re: open links in parent window (from child)?

  #2  
Nov 3rd, 2007
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
<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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:41 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC