resizing IE browser windows

Discussion in 'ASP .Net' started by Aaron, Sep 30, 2004.

  1. Aaron

    Aaron Guest

    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
    Aaron, Sep 30, 2004
    #1
    1. Advertising

  2. 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.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and have problems, email me.

    "Aaron" <> wrote in message
    news:...
    > 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
    >
    >
    Ken Dopierala Jr., Sep 30, 2004
    #2
    1. Advertising

  3. Aaron

    Aaron Guest

    Thank you. That's exactly what I needed.



    "Ken Dopierala Jr." <> wrote in message
    news:...
    > 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.
    >
    > --
    > Ken Dopierala Jr.
    > For great ASP.Net web hosting try:
    > http://www.webhost4life.com/default.asp?refid=Spinlight
    > If you sign up under me and have problems, email me.
    >
    > "Aaron" <> wrote in message
    > news:...
    >> 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
    >>
    >>

    >
    >
    Aaron, Sep 30, 2004
    #3
  4. Aaron

    darrel Guest

    > 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
    darrel, Sep 30, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kuv patel
    Replies:
    1
    Views:
    2,304
    Felbrigg
    Feb 5, 2004
  2. davebarkshire

    Image in browser not resizing!

    davebarkshire, Dec 17, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    303
    davebarkshire
    Dec 17, 2004
  3. WJ
    Replies:
    12
    Views:
    785
  4. Pil (Trustworthy from Experience)

    Resizing a div by resizing its borders

    Pil (Trustworthy from Experience), Apr 18, 2009, in forum: Javascript
    Replies:
    9
    Views:
    335
    Proper
    Apr 21, 2009
  5. Proper
    Replies:
    0
    Views:
    189
    Proper
    Apr 18, 2009
Loading...

Share This Page