Jump to content

popup link open page in parent window


The Little Guy

Recommended Posts

I don't remember how to do this, but when my popup window opens, there is a link in the window. When a person clicks on the link I want it to open a new tab in the main window (the one that opened the popup) and go to a specific page...

 

how do I do this?

 

Javascript:

function chatPop(){
newwindow=window.open('http://umok.us/connect/chat.php','chatwindow','height=500,width=510,resizable=no,scrollbars=no');
if (window.focus) {newwindow.focus()}
return false;
}

 

once this window opens, I wan't the link that the user clicks on to open a new page in the parent window.

Link to comment
https://forums.phpfreaks.com/topic/194583-popup-link-open-page-in-parent-window/
Share on other sites

<a href="something.com" target="_blank">link</a>

 

Though to be honest, I'm a strong opponent to using the target attribute to open up new windows/tabs for a user. If the user wants to open a new tab, they can do it themselves. You shouldn't make that decision for them. Drives me nuts when sites do that.

<a href="something.com" target="_blank">link</a>

 

Though to be honest, I'm a strong opponent to using the target attribute to open up new windows/tabs for a user. If the user wants to open a new tab, they can do it themselves. You shouldn't make that decision for them. Drives me nuts when sites do that.

 

If it opens in the current window, it interrupts the session and ends it which would piss you off more ;) since this is a chat window.

 

Anyways that works! I thought using that would open in the current window, not the parent :)

 

Thanks for the help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.