Resizing page on load with javascript -


    <script> function resize(){     mywindow.resizeto(600, 500);     mywindow.focus();     }     </script> </script> <style> canvas{     border: 1px solid black; } </style>  </head>  <body onload="resize()"> 

why not working? when add alert function works, resizing, please :)

browsers place lots of restrictions on resizeto; here's firefox's list.

fundamentally, if code didn't open window, or it's tab not window of own, can't resize it. can resize if opened window.open providing third argument (dimensions, features, etc.) , browser created new window (rather tab).


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -