Open another smaller window

Discussion in 'ASP .Net' started by Samuel Shulman, Nov 20, 2006.

  1. Hi

    I would like to open another smaller window on top of the existing window,
    how can I do that?

    Thank you,
    Samuel
    Samuel Shulman, Nov 20, 2006
    #1
    1. Advertising

  2. All "opening of windows" when a page is loaded in the browser must be done
    with client script. You can do this many ways, one of the simplest, just to
    experiment with , is:

    string scr= @"window.open('', tinyWindow', 'toolbar,width=150,height=100') ;
    myWindow.document.write('Welcome to this new window!');
    myWindow.document.bgColor='lightblue';";

    Response.Write("<script>" +scr + "</script>");


    Hope that helps.

    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Samuel Shulman" wrote:

    > Hi
    >
    > I would like to open another smaller window on top of the existing window,
    > how can I do that?
    >
    > Thank you,
    > Samuel
    >
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Nov 20, 2006
    #2
    1. Advertising

  3. NOTE: There are some syntax errors in the code I posted, but you get the
    general idea. You can also use the ClientScript methods of the Page class.
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Samuel Shulman" wrote:

    > Hi
    >
    > I would like to open another smaller window on top of the existing window,
    > how can I do that?
    >
    > Thank you,
    > Samuel
    >
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Nov 20, 2006
    #3
  4. You can open windows with the javascript window.open method. This includes
    options for sizing the window and making various toolbars and menus
    visible/invisible.
    Here's more info:
    http://SteveOrr.net/articles/ClientSideSuite.aspx
    http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

    Some popup blockers may foil your plans however, so consider alternate
    designs.

    --
    I hope this helps,
    Steve C. Orr,
    MCSD, MVP, CSM, ASPInsider
    http://SteveOrr.net


    "Samuel Shulman" <> wrote in message
    news:...
    > Hi
    >
    > I would like to open another smaller window on top of the existing window,
    > how can I do that?
    >
    > Thank you,
    > Samuel
    >
    Steve C. Orr [MVP, MCSD], Nov 21, 2006
    #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. Jerry Manner
    Replies:
    2
    Views:
    6,500
    SpaceGirl
    May 30, 2005
  2. Kevin
    Replies:
    1
    Views:
    303
    Victor Bazarov
    Mar 8, 2006
  3. gaurav kashyap
    Replies:
    3
    Views:
    6,610
    Paul Boddie
    Oct 31, 2008
  4. seeeker
    Replies:
    0
    Views:
    98
    seeeker
    Apr 25, 2004
  5. Replies:
    5
    Views:
    223
Loading...

Share This Page