Jump to content

Making the size of a window


The Sea King

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

Maybe rather than using 0, false may be better:For example: window.menubar = falseAnd if that doesn't work try "no", but that doesn't really make much sense to me.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...