If you are using below code to open a popup window in your web page, then address must be appearing in you pop up window and f you want to get rid of the address and do not want to show this to end user then you can follow the below example.

window.open("myPopupWindow.html", "_blank", "height=400, width=550, status=yes, toolbar=no, menubar=no, location=no, addressbar=no, top=200, left=300"); 

Solutions:

If you are just trying to mask the address, to make it look nicer or hide the fact that you’re linking to another website. Is it that you don’t want people to know they can access that page without using your popup?

If it’s the former, then what you could do is make the page you open in window.open an iframe, and point the iframe to your actual page. They user could still access the target page, but only via your nicer looking URL.

window.open('http://abc.com/message.html');

Your “message.html” page will contain the following content:

 <html>
       <body> 
          <iframe src="/realPage.html"></iframe>
       </body>

  </html>

If you want to open new tab then following code will work:

window.open('','_blank').location.href = "url"

Leave a Reply

Your email address will not be published. Required fields are marked *

Explore More

How to Center a Popup Window on Screen

JavaScript window.open() method is used to open a popup window. This popup window will be placed in the center of the screen. This example creates the pop-up window without placing it into

window.showModalDialog is deprecated in Edge and Chrome

If you have a website being compatible with Edge/Chrome and in past it was only compatible with IE 11 and if you are using window.showModalDailog in your JavaScript code, then

Cloning JavaScript Object with Object.create

We present another article focusing on understanding the concept of creating objects using Object.create. The article will discuss the advantages and disadvantages of using “Object.create” to clone objects. Let’s take