Forum Moderators: open
<a href="javascript;" onClick="
document.main.location.href= 'http://www.url.com';
self.close();
return false;
">Click here</a>
<a href="javascript;" onClick="
window.main.location.href= 'http://www.url.com';
self.close();
return false;
">Click here</a>
<a href="javascript;" onClick="
opener.location.href= 'http://www.url.com';
self.close();
return false;
">Click here</a>
That last one is the closest, but I know it just send you back to the original frame that opened it up. Any help would be greatly appreciated.
Willie Bodger
window.opener certainly must be part of the picture here. It's the only way to address the original window from a new window.
I'm not clear about what you want to have happen that your third script isn't doing. It should set the frame you've called "main" to the page url.com - or whatever URL you put in there.
TIA
Willie Bodger
WB
Though I would still like to know how to use the location.href to target a different frame...
location.href is a javascript command that tells a document to change it's current location URL to whatever you specify.
You can target any frame, by working from the top down (from the outermost frameset) to the fame you wish to address. For example, window.frameName.location.href will change the address of the frame called frameName.
parent refers to the parent frameset of the current frame, whereas using window goes to the very top and works it's way down.
HTH
WB