www.fgks.org   »   [go: up one dir, main page]

Skip Navigation Links
  

Microsoft Developer Network

Click to Rate and Give Feedback
Methods
 resizeTo Method
resizeTo Method

Sets the size of the window to the specified width and height values.

Syntax

window.resizeTo(iWidth, iHeight)

Parameters

iWidth Required. Integer that specifies the width of the window in pixels. The value can be either positive or negative.
iHeight Required. Integer that specifies the height of the window in pixels. The value can be either positive or negative.

Return Value

No return value.

Remarks

This method is not valid with windows created using the showModalDialog or showModelessDialog methods. In order to move or resize a dialog window created with these methods, change the dialogHeight, dialogWidth, dialogTop, and dialogLeft properties.

If the page (that contains this script) is hosted within an IFRAME, the IFRAME will move relative to the upper-left corner of the content area.

Microsoft Windows XP Service Pack 2 (SP2) or later. Windows that are located in the Internet Zone are subject to Window_Restrictions and will be forced to stay on screen. This applies to moveTo, moveBy, resizeTo, and resizeBy methods.

Note  When operating in high-dpi mode, pixel values are scaled up accordingly. See Adjusting Scale for Higher DPI Screens for additional information.

Windows Internet Explorer 7. This method is only effective when a single tab is open or when tabbed browsing is disabled. If multiple tabs are open, this method is blocked. For information regarding tab interaction from a script, see Tabbed Browsing for Developers.

Internet Explorer 7. This method is blocked if called by a foreign domain within a sub-frame (FRAME/IFRAME).

Standards Information

There is no public standard that applies to this method.

Applies To

window

See Also

resizeBy
Tags What's this?: Add a tag
Community Content
 
Add Community Content
Why does popup window size differ from previous size?      John Sudds - MSFT ... painnick   |   Edit   |  

한국만루 써두 되나 모르겠는데
Don’t know if this could be written in Korean.

risize 후 팝업창 사이즈가 전에 사이즈랑 틀려지는 이유는?
Why does popup window size change from previous size after risize(?) ?

I suspect that when you close a popup window, IE saves the window size as its default size for new windows. Unless you specify window dimensions in your call to window.open, IE will use the previously saved window size.

NOTE: Korean is fine! However, this is not the right place to ask questions. Please refer to the MSDN Forums.

http://forums.microsoft.com/MSDN/default.aspx

Another answer.

width/height parameters on window.open() method means content-size.(exclude title-bar and status-bar etc...)

but width/height parameters on window.resizeTo() method includes title-bar and status-bar etc...

Tags What's this?: dhtml (x) Add a tag
Minimum or Maximum width restrictions for a child window      GetJins ... Noelle Mallory - MSFT   |   Edit   |  

Please, Is there any minimum or maximum width restrictions for a child window?
Is it possible to set the height and width of a child window to "1px"

[Noelle Mallory - MSFT] Please post questions to the MSDN Forums at http://forums.microsoft.com/msdn. You will likely get a quicker response through the forum than through the Community Content.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG