2

I am trying to hide the address bar from the popup window using javascript or jquery. When the window pop up's I want to hide the address bar from the window. I dont want to show the link where the pop up is redirected. Here is the code.The address bar can be still seen

$(document).ready(function(){
 $(".chat_pannel").click(function () {
  //$("#dialog").dialog({modal: true, height: 590, width: 1005 });
        var w = window.open("http://www.google.com", "popupWindow", ",resizable=false,width=400, height=500,titlebar=0,toolbar=0");
        $(this).hide();
    });
});
user3168637
  • 121
  • 4
  • 15
  • It might help you - https://stackoverflow.com/questions/10968763/remove-address-bar-from-popup-window-using-javascript – ali Nov 25 '17 at 04:25

2 Answers2

-1

From this SO answer

window.open('http://www.google.com', 'popupWindow','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=720,height=800');

This won't work in most of the modern browsers, since ability to hide the address encourages phishing.

nipunasudha
  • 2,427
  • 2
  • 21
  • 46
-1

The location=no, that should hide the address bar but all new browser probably doesn't support this because of security reason.

var w = window.open("http://www.google.com", "popupWindow", ",resizable=false,,location=no,width=400, height=500,titlebar=0,toolbar=0");

For this reason you can use http://jqueryui.com/dialog/