Change the window name in your two different calls:

function popitup(url,windowName) {
       newwindow=window.open(url,windowName,'height=200,width=150');
       if (window.focus) {newwindow.focus()}
       return false;
     }

windowName must be unique when you open a new window with same url otherwise the same window will be refreshed.

Answer from Umesh on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › open
Window: open() method - Web APIs | MDN
The Window interface's open() method takes a URL as a parameter, and loads the resource it identifies into a new or existing tab or window. The target parameter determines which window or tab to load the resource into, and the windowFeatures parameter can be used to control to open a new popup with minimal UI features and control its size and position.
🌐
JavaScript.info
javascript.info › tutorial › frames and windows
Popups and window methods
This way users are somewhat protected from unwanted popups, but the functionality is not disabled totally. The syntax to open a popup is: window.open(url, name, params):
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Mozilla › Add-ons › WebExtensions › API › browserAction › openPopup
browserAction.openPopup() - Mozilla | MDN
1 week ago - Open the popup when the user selects a context menu item: js · browser.menus.create({ id: "open-popup", title: "open popup", contexts: ["all"], }); browser.menus.onClicked.addListener(() => { browser.browserAction.openPopup(); }); Was this page helpful to you?
🌐
Quackit
quackit.com › javascript › popup_windows.cfm
JavaScript Popup Windows
If you only want to open a new browser window you can add the target="_blank" attribute within the <a> element (see this article on opening a new window in HTML). JavaScript popup windows however, are more powerful. Using JavaScript's window.open() method, you can determine what the window ...
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-open-a-popup-on-click-using-javascript
How to Open a Popup on Click using JavaScript ? - GeeksforGeeks
August 5, 2025 - Example: In this example we displays a popup dialog and overlay using the display property. Clicking "Open Popup" shows the dialog and overlay, while "Close" hides them.
🌐
QuirksMode
quirksmode.org › js › popup.html
JavaScript - Popups
You can add a TARGET="_blank" to the <a>-tag, but this simply opens a new browser window that completely obscures the old one. This may be what you want, but at other times a small window on top of the large browser window is much better. This small window is popularly known as a popup.
Find elsewhere
🌐
HTML.com
html.com › javascript › popup-windows
Popup Windows Made Easy: Here's The JavaScript Code To Copy And Paste »
March 19, 2020 - Then we’ll show the techniques for targeting a link inside the popup back to the main page. Finally, we’ll work through the many parameters for the open() command that adds features to your popups.
🌐
Javascript-coder
javascript-coder.com › window-popup › javascript-window-open
Using the window.open method | JavaScript Coder
windowFeatures A string that determines the various window features to be included in the popup window (like status bar, address bar etc) The following code opens a new browser window with standard features. window.open ("http://jsc.simfatic-solutions.com","mywindow"); You can control the features of the popup using the last argument to the window.open method.
🌐
OutSystems
outsystems.com › forums › discussion › 90989 › how-to-open-pop-up-by-javascript
how to open pop up by javascript | OutSystems
September 1, 2023 - how to open pop up by javascript · Hi Omar, can I ask why would you want to do that
🌐
SitePoint
sitepoint.com › blog › javascript › js code snippet to open a popup window
js code snippet to open a popup window — SitePoint
February 13, 2024 - Here is a basic example: var myWindow = window.open("", "myWindow", "width=200,height=100"); myWindow.document.write("<p>This is 'myWindow'</p>"); In this example, the window.open() method takes three parameters: the URL of the page to open (left blank here to create an empty window), the name ...
🌐
W3Schools
w3schools.com › howto › howto_js_popup.asp
How To Create Popups
Learn how to create popups with CSS and JavaScript.
🌐
Laurentian
web.cs.laurentian.ca › rsgrewal › c2206 › javascript › examples › windows › windows.html
Opening a pop up window
Close pop up window and click the following link to open it again. ... This method uses a special form of link which just executes a javascript function. ... Other useful features are menubar="yes", resizable="yes", scrollbars="yes", toolbar="yes", and status="yes". Note that the javascript designers cannot spell: use resizable not resizeable. The default values are "no". Click the following link to see a popup window with these values turned on.
🌐
Quora
quora.com › How-do-you-create-a-new-popup-window-in-JavaScript
How to create a new popup window in JavaScript - Quora
Answer (1 of 2): I would suggest you to use window.open() Here is the syntax and parmeter of window.open(): window.open(URL, windowName, [windowFeatures]) URL: The URL of the page to open.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Mozilla › Add-ons › WebExtensions › API › pageAction › openPopup
pageAction.openPopup() - Mozilla - MDN Web Docs
Open the page action's popup. You can only call this function from inside the handler for a user action. js · browser.pageAction.openPopup() None. A Promise that is resolved with no arguments. Open the popup when the user selects a context menu item: js · browser.menus.create({ id: "open-popup", title: "open popup", contexts: ["all"], }); browser.menus.onClicked.addListener(() => { browser.pageAction.openPopup(); }); menu-remove-element ·
🌐
GitHub
gist.github.com › Amitesh › 1113683
Open popup window in center of screen in javascript · GitHub
Clone this repository at &lt;script src=&quot;https://gist.github.com/Amitesh/1113683.js&quot;&gt;&lt;/script&gt; Save Amitesh/1113683 to your computer and use it in GitHub Desktop. ... This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ... This can be used also to center popup window in center of screen in javascript var width = 600; var height = 600; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var popup = window.open(pdfUrl, "_blank", "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
🌐
Butterfly
getbutterfly.com › how to open a javascript centered popup window
How to Open a JavaScript Centered Popup Window – getButterfly
May 17, 2022 - function window_popup(content, x, y, title) { let thisWindow; thisWindow = window.open(content, title, "width="+x+", height="+y+", scrollbars=auto, screenX=0, screenY=0, toolbar=no, location=no, menubar=no"); thisWindow.moveTo((screen.width...
🌐
GitHub
gist.github.com › dinkydani › f9d8dd08b0e9a5299e11cd2a1f67f81d
open-popup.js · GitHub
Clone this repository at &lt;script src=&quot;https://gist.github.com/dinkydani/f9d8dd08b0e9a5299e11cd2a1f67f81d.js&quot;&gt;&lt;/script&gt; Save dinkydani/f9d8dd08b0e9a5299e11cd2a1f67f81d to your computer and use it in GitHub Desktop. Download ZIP · Raw · open-popup.js ·