Jump to content

Making the size of a window


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 post
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 post
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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...