How to disable location bar and pop window scrollbars in Chrome?

If the following code width and height work in Chrome, but the location and scroll bar do not work. Please guide.

<script language="JavaScript"> function newwindow() { window.open('http://localhost/a.php', 'jav', 'width=300,height=200,resizable=yes,location=no,scrollbars=no'); } </script> <a href="javascript:newwindow()">Click Here</a> 
+6
source share
2 answers

Chrome will not allow you to do this for security reasons. Hiding the address bar makes it easy to pretend to you somebank.com when you really are somenigerianguy.com .

As for the scrollbar, you can use css on a.php to hide the scrollbars by setting overflow: hidden .

+18
source

To hide the scroll bar: try setting "overflow: hidden"; in css

You cannot open a popup without a location bar, as in IE, so that you can use an iframe or a third-party jQuery plugin in a workaround

+2
source

Source: https://habr.com/ru/post/893074/


All Articles