How to open popup in JavaScript? (NOT window.open)

Advertisements

This is kind of a dumb question, but what is the command to open a popup window in JS? I know that window.open works, but on chrome, it shows the tabs, which I have seen in popups not existing. It should just show the address at the top. Hopefully I expressed this question correctly.

>Solution :

Default behavior is to open in a new tab. However, using the third parameter windowFeatures in the window.open(...); function will allow you to set parameters to force the request to open in a new popup with the minimal UI elements that you’re requesting. For example:

window.open("{url}", "_blank", "popup=yes");

Reference Documentation: window.open()

Leave a ReplyCancel reply