Open a new browser window

Discussion in 'ASP .Net' started by Xarky, Apr 13, 2005.

  1. Xarky

    Xarky Guest

    Hi,
    I have a button on my form, and on its click event, I would like to
    open a new window of my browser with a specific link.

    I have been searching on the net, but can't find the appropriate code.

    I hope someone understands my problem, and helps me out.
    Thanks in Advance.
    Xarky, Apr 13, 2005
    #1
    1. Advertising

  2. Xarky

    Brock Allen Guest

    In your Button's Click event, do something like this:

    Page.RegisterStartupScript("redirect", "window.open(...)")

    When the page loads, the startup script will run to launch the new window.
    I forget the params to window.open to launch a new browser. Here are the
    docs for it though:

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi,
    > I have a button on my form, and on its click event, I would like to
    > open a new window of my browser with a specific link.
    > I have been searching on the net, but can't find the appropriate code.
    >
    > I hope someone understands my problem, and helps me out. Thanks in
    > Advance.
    >
    Brock Allen, Apr 13, 2005
    #2
    1. Advertising

  3. Xarky

    Brock Allen Guest

    Misfire there. Here are the docs on window.open:

    http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > In your Button's Click event, do something like this:
    >
    > Page.RegisterStartupScript("redirect", "window.open(...)")
    >
    > When the page loads, the startup script will run to launch the new
    > window. I forget the params to window.open to launch a new browser.
    > Here are the docs for it though:
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >> Hi,
    >> I have a button on my form, and on its click event, I would like to
    >> open a new window of my browser with a specific link.
    >> I have been searching on the net, but can't find the appropriate
    >> code.
    >> I hope someone understands my problem, and helps me out. Thanks in
    >> Advance.
    >>
    Brock Allen, Apr 13, 2005
    #3
    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. =?Utf-8?B?Tm92aWNl?=
    Replies:
    2
    Views:
    6,619
    Alan Ferrandiz Langley
    Jun 9, 2004
  2. Shiperton Henethe
    Replies:
    17
    Views:
    5,358
    Deirdre Saoirse Moen
    May 21, 2004
  3. Gordon
    Replies:
    3
    Views:
    289
    Steven Burn
    Apr 16, 2004
  4. raj
    Replies:
    0
    Views:
    184
  5. PC HUA
    Replies:
    2
    Views:
    392
    PC HUA
    May 19, 2004
Loading...

Share This Page