Web Hosting Talk







View Full Version : Target Windows


yeswebmaster
07-12-2001, 12:11 PM
I know _blank opens a new one, but what does _parent do?

I think I know, but it's not working. Say on my web site, http://www.yeswebmaster.com you click a button, and a pop-up window opens. Then you click a link in the pop-up window with a _parent taget. It would change the original browser window with yesWebmaster.com main page in it right?

That's what I thought it did, but when I preview a new page for yesWebmaster.com, that hasn't been published yet, and open the pop-up window and click a link with the _parent as the target, it doesn't change the original browser, instead changes the pop-up window that contains the link.

Is it because it's not published yet?

Any help would be greatly appreciated.

Thanks,

Jonathan P.
Owner/Webmaster
http://www.yeswebmaster.com

JustinK
07-12-2001, 01:21 PM
Not sure about not being published yet, but I always thought _parent was for frames and whatever browser window your in it'd open up that link in the full window. Such as you have a 3 frame page, header, middle, footer. The link with _parent is in the middle. You click it, it'll open the page in the whole window instead of the middle frame. Probably wrong on this and I've never actually used anything other than _blank, but I could have sworn that's what I read about a long long time ago.

Add-on after quick search on dogpile:

Yes, it is indeed made to pull up a main page where the framed pages once were. I'll see if I can find that little "main window" trick for you though if no one beats me to it. :)

yeswebmaster
07-12-2001, 01:35 PM
Ok, thanks for your help. I'll look for it to, I think I saw something in the ZDnet script library, I'll look there.

Thanks,

Joanthan P.
Owner/Webmaster
http://www.yeswebmaster.com

JustinK
07-12-2001, 01:55 PM
In the header of the pop-up:
<script>
<!--
function remote2(url){
window.opener.location=url
}
//-->
</script>



Link:
<a href="javascript:remote2('http://url.here/smiley')">stuff</a>

yeswebmaster
07-12-2001, 03:36 PM
Thank you for finding that, I didn't have the time to go search for it. :)