Open a new browser window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rik Brooks

    Open a new browser window

    I know that I can redirect my user to another url with Response.Redire ct, but
    is there a way to open another browser, preferrably one with the menu and
    toolbars not visible?

    In other words, I'm looking to get as close to a modal dialog in a browser
    based app as I can. I know that this has been solved. I've seen it done. It's
    just that, faced with the massive amount of documentation I have no idea
    where to look..
    --
    ----------------------------------------
    Magic is not in the hands of the magician but in the mind of the audience.

    Animadverto est verus


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Open a new browser window

    Rik,

    Check the documentation for the open method on the window object in
    javascript. This will be called from javascript that is called on the
    client side (due to some event). In the open method, you can specify how
    the new browser window will appear (with toolbars, etc, etc). It should be
    noted that some of these options are no longer valid in Windows XP SP2, due
    to security concerns.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Rik Brooks" <rbrooks@hhcc.c om.donotspam> wrote in message
    news:54D10A72-83F3-4C70-8046-8ADD4A98500C@mi crosoft.com...[color=blue]
    >I know that I can redirect my user to another url with Response.Redire ct,
    >but
    > is there a way to open another browser, preferrably one with the menu and
    > toolbars not visible?
    >
    > In other words, I'm looking to get as close to a modal dialog in a browser
    > based app as I can. I know that this has been solved. I've seen it done.
    > It's
    > just that, faced with the massive amount of documentation I have no idea
    > where to look..
    > --
    > ----------------------------------------
    > Magic is not in the hands of the magician but in the mind of the audience.
    >
    > Animadverto est verus
    >
    >[/color]


    Comment

    • Denny Boynton

      #3
      Re: Open a new browser window

      Rik,

      Here's a reference site where you can find the syntax for the
      window.open() JavaScript method:



      Also, if you intend to open the new window from an ASP.NET server
      control, you'll need to reference the JavaScript function in the
      Attributes collection of the server control in order to make it fire
      correctly from the client-side script.

      HTH

      Thanks,
      Denny Boynton

      Comment

      • Rik Brooks

        #4
        Re: Open a new browser window

        This was great, and worked very well. Now I have another problem. I have a
        server side button that needs to do some preperation and afterwards, if
        everything goes well, open a new browser with a specific url.

        Your responses showed me how to execute javascript from a server side
        control, adding the javascript to the attributes. That addressed the problem
        that I had. Now I have another. I need to open the browser window AFTER the
        code behind event is finished, and even then only in the case that the event
        finished successfully.

        So, is there any way to accomplish this?
        --
        ----------------------------------------
        Magic is not in the hands of the magician but in the mind of the audience.

        Animadverto est verus




        "Denny Boynton" wrote:
        [color=blue]
        > Rik,
        >
        > Here's a reference site where you can find the syntax for the
        > window.open() JavaScript method:
        >
        > http://www.javascripter.net/faq/openinga.htm
        >
        > Also, if you intend to open the new window from an ASP.NET server
        > control, you'll need to reference the JavaScript function in the
        > Attributes collection of the server control in order to make it fire
        > correctly from the client-side script.
        >
        > HTH
        >
        > Thanks,
        > Denny Boynton
        >
        >[/color]

        Comment

        Working...