Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open new popup chrome window without tab section

Sometimes surfing the web with chrome,I encounter a website or web app,when click on an <a> or <button> element it opens a new popup browser window which does not have tab section while I do not have any Chrome Extension installed:

main window:

enter image description here

popup new window:

enter image description here

My question is,How to do this using JavaScript?

Thanks.

like image 226
Fereydoon Barikzehy Avatar asked Dec 20 '25 19:12

Fereydoon Barikzehy


2 Answers

Please see tutorial here: http://www.w3schools.com/jsref/met_win_open.asp

<script>
function myFunction() {
    window.open("http://www.w3schools.com","_blank",
    "toolbar,scrollbars,resizable,top=500,left=500,width=400,height=400");
}
</script>
like image 52
Devnsyde Avatar answered Dec 22 '25 10:12

Devnsyde


<!DOCTYPE html>
<html>
<body>

<button onclick="openTheWindow()">open window</button>

<script>
function openTheWindow() {
    var myWindow = window.open("", "", "width=800,height=800");
}
</script>

</body>
</html>
like image 31
Ahmed Avatar answered Dec 22 '25 09:12

Ahmed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!