You should be using some kind of custom made popups and dialogue like

  1. http://umairj.com/27/how-to-create-simple-modal-dialogue-using-jquery/

  2. http://www.jquery4u.com/windows/14-jquery-modal-dialog-boxes/

Answer from Harshil Kulkarni on Stack Overflow
🌐
JavaScript in Plain English
javascript.plainenglish.io › say-goodbye-to-window-open-df6056343797
Say Goodbye To window.open👋
July 20, 2025 - // Old way with window.open const popup = window.open('https://example.com', 'popup', 'width=400,height=300'); // Often blocked by browsers // New way with Document PiP const pipWindow = await documentPictureInPicture.requestWindow({ width: 400, height: 300 }); // Always works, always on top
Discussions

Jquery or Javascript alternative to window.open to get a different target
Find answers to Jquery or Javascript alternative to window.open to get a different target from the expert community at Experts Exchange More on experts-exchange.com
🌐 experts-exchange.com
December 11, 2014
searching for an alternative to window.open without opening a window lol
I think you gotta understand PHP scripts aren't just files you can "open". PHP files are meant to live on a proper HTTP server. When someone goes to the URL (something like example.com/script.php ) his or her client (the web browser) can do a GET request or a POST request. The php script can then do something with this data. In your example, JavaScript could store the password in a variable and pass it to PHP using an HTTP POST request via an HTML form or the fetch API (make sure its HTTPS when dealing with passwords). Your PHP script will have this data available in $_GET and $_POST and you can check it against a password hash. By the way, the if (password.toLowerCase() == "password") thing is a big no-no! Check out https://www.php.net/password and this video , you'll understand why. More on reddit.com
🌐 r/learnjavascript
1
1
June 5, 2020
Alternative zu window.open
Hallo! Auf meiner Seite werden Bilder im Moment über die Javascript Funktion window.open beim onclick Ereignis vergrößert dargestellt, da ich so die Möglichkeit habe, die Fenstergröße zu bestimmen. Ist es irgendwie möglich, zusätzlich zu dem Javascript eine Alternative zu schreiben (z.B. More on forum.chip.de
🌐 forum.chip.de
June 2, 2004
Lightning Alternative of Window.Open() method ...
🌐 developer.salesforce.com
November 1, 2018
🌐
Webmaster World
webmasterworld.com › html › 3031854.htm
alternative to window.open() - HTML forum at WebmasterWorld - WebmasterWorld
August 2, 2006 - <a onclick="window.open('webpage.htm' ,'Max', 'toolbar=no, width=400, height=275, left=100, top=100, screenX=200, screenY=150, status=yes, scrollbars=yes, resize=yes'); return false" href="#"> This code is currently being stopped by pop-up blockers. There is some concern that since most of our customers are fairly computer illiterate that they may not realize that the link is working it's just being blocked. Does anyone know of an alternative way of opening a link into a resized new window without using window.open?
🌐
JavaScript.info
javascript.info › tutorial › frames and windows
Popups and window methods
Popup windows are used rarely, as there are alternatives: loading and displaying information in-page, or in iframe. If we’re going to open a popup, a good practice is to inform the user about it.
🌐
Experts Exchange
experts-exchange.com › questions › 28579365 › Jquery-or-Javascript-alternative-to-window-open-to-get-a-different-target.html
Solved: Jquery or Javascript alternative to window.open to get a different target | Experts Exchange
December 11, 2014 - jQuery will emulate the click in so far as any click events/functions attached to the link will be fired It cannot simulate a person actually clicking the link. There is no reason a simple window.open shouldn't work
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › open
Window: open() method - Web APIs | MDN
In some cases, JavaScript is disabled or unavailable and window.open() will not work. Instead of solely relying on the presence of this feature, we can provide an alternative solution so that the site or application still functions.
🌐
nopCommerce
nopcommerce.com › en › boards › topic › 19659 › javascript-windowopen-alternative
javascript window.open alternative - nopCommerce
October 4, 2012 - OK, so I pretty much broke all rules of good practice because I have no asp.net mvc experience and couldn't figure out how to create a proper popup in my code. Well, I got the window to popup, but no view... anyway, I did it the old way with an asp page. Classic. The good stuff. Anyway, I have a link to the ASP page as a javascript window.open popup under the description on my product variant.
Find elsewhere
🌐
ServiceNow Community
servicenow.com › community › upgrades-and-patching-forum › alternative-for-window-open-in-angular-services › m-p › 3042885
Alternative for Window.Open() in Angular services - ServiceNow Community
September 12, 2024 - $scope.openPopUp = function() { var url = "$chat_support.do?queueID=" + $scope.data.connect_support_queue_id; var popup = window.open (url, "popup", "width=900, height=600"); };
🌐
Coderanch
coderanch.com › t › 53001 › frameworks › alternative-window-open-Struts
Is there any alternative for window.open in Struts (Struts forum at Coderanch)
The only other way I know of to open up a new window is to specify target="_blank" on either a <html:form> tag or a link (either <a> or <html:link>). This causes the next page to appear in a new window. The problem with this method is that you have no control over the size or position of the ...
🌐
Coderanch
coderanch.com › t › 118092 › languages › options-opening-window
options for opening a new window
One large drawback to using a window.open() is the IE information bar that appears when a supposed pop-up is encountered. An alternative to window.open is to use the target tag on a link or form. But that doesn't give you as much control.
🌐
Zipy
zipy.ai › blog › how-to-open-a-url-in-a-new-tab-and-not-a-new-window
how to open a url in a new tab (and not a new window)
April 12, 2024 - Navigating the vast world of web development, one often encounters the need to enhance user experience by implementing features that are both intuitive and efficient. A common yet critical feature is opening a URL in a new tab rather than in a new window. This action not only keeps the user's ...
🌐
CHIP
forum.chip.de › html, css, javascript
Alternative zu window.open — CHIP-Forum
June 2, 2004 - das ganz normale "a href=..."), für die Leute, die Javascript deaktiviert haben? Also, dass das Fenster mit dem vergrößerten Bild mit window.open geöffnet wird, wenn Javascript aktiviert wird und halt über die Alternative, wenn Javascript deaktiviert ist.
🌐
Stack Diary
stackdiary.com › home › development › how to open url in a new tab with javascript
How to Open URL in a New Tab with JavaScript - Stack Diary
September 29, 2023 - As an alternative, you could try and implement a tooltip over it - to give your users an idea of what the button does. You can also create specific functions for individual URLs, and then append the onclick Event to your HTML button.
🌐
Reddit
reddit.com › r/learnprogramming › is there any alternative to window.open to print a pdf? (dialog to print the pdf)
r/learnprogramming on Reddit: Is there any alternative to window.open to print a PDF? (dialog to print the PDF)
June 1, 2022 -

I have to open a PDF and ask to print it automatically. I did this:

const pdfWindow = window.open("generate_pdf.php?id="+id, "_blank");
if (!pdfWindow) {
    alert("You have to enable popups");
} else {
    pdfWindow.addEventListener("load", function () {
        pdfWindow.print();
    }, false);
}

this is working correctly, window.open opens the link that output the PDF, then when the page loaded, it calls pdfWindow.print(); that open the dialog to print the PDF.

The problem is that browsers default have popup disabled. So most users will see "You have to enable popups" alert, because window.open will fails. I know popups can be easily enabled, but this is not nice for most users :(

Is there an other solution instead of window.open to open "generate_pdf.php", then, when "generate_pdf.php" generated the PDF, automatically ask to print it?

I used window.open because user should to remain on the main page.

Edit: sorry, language is Javascript. The reason why I have to automatically open the print dialog is because I want to be sure that operators will not forget to print the PDF, because they must to print it

🌐
Google Groups
groups.google.com › a › chromium.org › g › blink-dev › c › q6ybnmxxvpE › m › 2snoh6wkAgAJ
Intent to Ship: New window.open() popup vs. window behavior
there's no alternative for getting actual UI visibility · on Chromium · this was returning each features in window.open call · on Firefox and Safari · this is/was mostly returning the actual visibility · > Have they implemented? Have they shipped? Firefox implemented and shipped the change in version 96, that will be released on 2022-01-11: https://bugzilla.mozilla.org/show_bug.cgi?id=1701001 ·