jquery - Resizing popup window with resizeTo is working when I type directly on console but not in the JavaScript code -


i google , tried many things still don't understand why resizeto isn't working in case. found resizeto working when popup created window.open , respected rule. , problem, have popup window created window.open in page named a.aspx.

 var mywin = window.open(myurl, '', "width=400,height=250"); 

then tried resize popup using resizeto in page named b.aspx.

<body bgcolor="white" ms_positioning="gridlayout" onload="javascript:resizepopup();"> .... </body>  <script type="text/javascript" language="javascript">     function resizepopup() {         var targetwidth = document.body.scrollwidth + 80;         var targetheight = document.body.scrollheight + 80;         window.resizeto(targetwidth, targetheight);     } </script> 

this not working @ all. tried resize popup typing directly on console

 resizeto(1000,1000); 

but resizes popup. tried same thing make sure on master window page , doesn't work it's written in rule. tried resize popup in a.aspx after open , working. don't understand this.

anyone can explain me this? why doesn't work or understand isn't correct?

i solve problem using parent.resizeto.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -