javascript - window.open on page load -


i trying load window when page loaded. if try open window using button code works.

i iam using:

$(document).ready(function() { window.open ('http://google.com/', 'newwindow', config='height=720,width=1064, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no'); }); 

however, not load window.

any suggestion?

$(document).ready(function() {    window.open('http://google.com/', 'newwindow', config = 'height=720,width=1064, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');    $('.open_webmail').click(function() {      window.open('http://google.com/', 'newwindow', config = 'height=720,width=1064, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');    });  });
.open_webmail {    background-color: rgba(0, 124, 255, 0.7);    color: white;    font-size: 18px;    cursor: pointer;    -webkit-transition: 550ms ease-in-out;    transition: 550ms ease-in-out;    -moz-transition: 550ms ease-in-out;    -o-transition: 550ms ease-in-out;    -ms-transition: 550ms ease-in-out;    display: inline-block;    position: fixed;    top: 0;    bottom: 0;    left: 0;    right: 0;    width: 200px;    height: 100px;    margin: auto;  }  .open_webmail:hover {    background-color: rgba(163, 0, 255, 0.7);    color: #c5c5c5;  }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>  <button type="button" class="open_webmail">login</button>

you try $(window).ready() check pop-up settings, maybe it's being blocked. because code works on js fiddle, tested it.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -