SP.UI.Dialog.autoSize() Method
Applies to: SharePoint Foundation 2010
Changes the size of the dialog automatically to fit the content.
SP.UI.Dialog.autoSize();
Remarks
This method changes the size of the dialog to fit the content, unless the size was not assigned when the dialog was created. If the size was assigned when the dialog was created, this method changes the size of the dialog to the assigned size.