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


and click the link 'Veiw Active Topics' near the top. popup has green snake background.


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.

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

<!--// 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;


<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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.