Jump to content

Making the size of a window


The Sea King
 Share

Recommended Posts

The toolbar can only be set before the window is opened.If you want to empty the window (I notice 'location=no') you can try:window.location.href = "about:blank";About other properties:window.personalbar = 0;window.statusbar = 0;window.menubar = 0;window.scrollbars = 0;There's no resizeable property for an existing window, but this script might be able to fix that:window.onresize = function() {return false;window.resizeTo(W,H); //W and H were defined in the script I showed you before}The window should maintain its history if you're not opening a new window.

Link to comment
Share on other sites

<script type="text/javascript">window.location.href = "about:window.personalbar = 0;window.statusbar = 0;window.menubar = 0;window.scrollbars = 0;";window.onresize = function() {W = 600;H = 425;window.resizeTo(W,H);}</script>

Link to comment
Share on other sites

<script type="text/javascript">window.location.href = "about:window.personalbar = 0;window.statusbar = 0;window.menubar = 0;window.scrollbars = 0;";window.onresize = function() {return false;window.resizeTo(W,H);W = 600;H = 425;window.resizeTo(W,H);</script>
Do you need it to be javascript?
<script type="text/javascript">window.location.href = "about:window.personalbar = 0;window.statusbar = 0;window.menubar = 0;window.scrollbars = 0;";window.onresize = function() {W = 600;H = 425;window.resizeTo(W,H);}</script>

the window.location.href will change the URL, so if your making the URL different change the code to

top.location.replace

<script type="text/javascript">top.location.replace = "about:window.personalbar = FALSE;window.statusbar = FALSE;window.menubar = FALSE;window.scrollbars = FALSE;";window.onresize = functionRESIZE() {W = 600;H = 425;window.resizeTo(W,H);}</script>

Try that code. If it doesn't work try 'NULL' instead of FALSE. If that doesn't work tell me then -.-

Link to comment
Share on other sites

Does anybody realise the problem is this?:= "about:I wrote = "about: blank" in the original code. All those who have been revising my code and know something should have been aware of this.

Link to comment
Share on other sites

Does anybody realise the problem is this?:= "about:
Yeah, justsomeguy pointed that out a few posts ago.
If you want to empty the window (I notice 'location=no') you can try:window.location.href = "about:blank";
Another way to clear the screen, if that's what you are trying to do, is to run something like this after the page has loaded:
function clearScreen(){	document.open();	document.write("");	document.close();}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...