Jump to content

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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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