Hi

function winSwap(winLink) {
alert('function called');
var newWin = winLink;
if(window.opener && !window.opener.closed){
	window.opener.location = winLink;
	window.opener.focus();
	alert(winLink);
} else { 
	window.open(winLink, 'newWinName');
	alert('new window called');
	}
}

Alright this code works fine everywhere but IE6, like everything else. Anyway the site opens a target blank window and on that window is that function to change the url of the opener and refocus the opener. Everypage with the function is atleast 1 page away from the target blank window that is opened so Im assuming ie6 doesnt know there is an opener anymore. Does anyone have another way of doing this?

Works fine in ie6 when you click from the page that is directly opened, but if you go to a new page on that window it no longer works. Thanks.

Nevermind, this code seems to work fine, something else on the site is causing it not to work. If anyone ever wants to use this, use the script above and also:

<a href="" onClick="winSwap('http://www.siteurl.com');">link</a>

To call the function.

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.