Important alert: (current site time 7/15/2013 1:30:47 PM EDT)
 

VB icon

Change window size after creation

Email
Submitted on: 6/5/1998
By: Found on the Web 
Level: Not Given
User Rating: By 3 Users
Compatibility: JavaScript
Views: 21401
 
     Is it possible to dynamically alter the size of a window after it has been created? Found at: http://www.irt.org
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: Change window size after creation
' Description:Is it possible to dynamically alter the size of a window after it has been created?
 Found at: http://www.irt.org
' By: Found on the Web
'**************************************

The following works in NN4 only: 
<SCRIPT LANGUAGE="JavaScript"><!--
if (window.screen && document.layers) {
window.moveTo(0,0);
window.outerHeight = screen.availHeight;
window.outerWidth = screen.availWidth;
}
//--></SCRIPT>
 
The following works in both NN4 and MSIE4: 
<SCRIPT LANGUAGE="JavaScript"><!--
window.resizeTo(655,450);
//--></SCRIPT>
 
They don't however work the same. NN4 resizes the window so that the document pane is 655x450, whereas MSIE resizes the window to 655x450. 


Other 219 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
3/16/2002 11:09:40 PMRazavian

This is great code but i have a problem. Whenever i use this it of course shrinks the window that i programmed it to but it also does it to all the other windows that i load. i can i prevent this?
(If this comment was disrespectful, please report it.)

 
11/8/2002 5:37:59 AMMillennium Solutions

I have a more detailed code, which will work. No errors etc, i have not posted it on PSC, but i'll send it to you if you ask for it.

Jenovah_commander@hotmail.com

Your script in theory should work, but mine took some time to figure out, but it works better and is more reliable.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.