javascript - How to open a window with window.open that fits its contents? -
i have window opening via window.open
. call window.open
can take parameters width, height, scroll bars, etc. in application, use window.open
show screen of varying height. instance, may 200 pixels high or 400 pixels high depending on user state. state unknown @ location of window.open
. possible have opened window sized fit content? far can tell, can use window.resizeto
, doesn't seem work in chrome.
if possible, load content in parent page inside container div, obtain container div's width , height using javascript's *.offsetwidth , *.offsetheight, use values in window.open have new window fit content.