resizing IE browser windows

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

I am opening a page, appfile.aspx, with this:
Dim script As String

script =
"<script>window.open('appfile.aspx','NewPage','top=0,left=0');</script>"

Page.RegisterClientScriptBlock("MyScript", script)



I am resizing appfile.aspx with this:

<script type="text/javascript">
self.resizeTo(632,500);
window.focus();
window.name = 'newWin';
</script>



This works pretty nicely, but currently the browser opens at a much larger
size, and then is resized to 632x500. Does anyone know how to open the
browser with the correct dimensions?

Thanks
Aaron
 
Hi Aaron,

In your window.open() try this:

window.open('appfile.aspx','NewPage','width=632,height=500,top=0,left=0');

Then you can remove the self.resizeTo() call. Good luck! Ken.
 
This works pretty nicely, but currently the browser opens at a much larger
size, and then is resized to 632x500.

You are resizing after the page opens. If you want it sized to begin with,
you need to launch it from another page.

-Darrel
 
Back
Top