Open a new webpage On SelectedIndexChanged (Dropdown)

Discussion in 'ASP .Net Web Controls' started by Brian Reaburn, May 31, 2004.

  1. Hi,

    I'm looking for some help. I would like to know how to launch a new IE
    browser window when I select an item from a dropdown box. I know this is
    possible I've seen many examples of where people have done it, but I can't
    find any information on how.

    I'm using VB as my page language. Thanks in advance...

    Brian
    Brian Reaburn, May 31, 2004
    #1
    1. Advertising

  2. Hi


    You have to do it on the client...

    <select onchange="doIt(this)"....

    <script>
    function doIt(e){
    if(e.selectedIndex < 1 ) return; // First opt a no go
    var w = window.open("pageToGo.aspx?ID=" +
    e.options[e.selectedIndex].value,"myWin","WIN-SPECS");
    }
    </script>

    More info
    http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Visual: Scripting MVP 2000-2004
    http://www.icysoft.com/
    http://www.deus-x.com/ Instant e-commerce
    http://www.microsoft.com/technet/scriptcenter/
    Playground: http://213.190.104.211/ ( IE 5.5+ only )

    No matter where you go there you are
    ==============================
    "Brian Reaburn" <> wrote in message
    news:...
    > Hi,
    >
    > I'm looking for some help. I would like to know how to launch a new IE
    > browser window when I select an item from a dropdown box. I know this is
    > possible I've seen many examples of where people have done it, but I can't
    > find any information on how.
    >
    > I'm using VB as my page language. Thanks in advance...
    >
    > Brian
    >
    >
    Vidar Petursson, Jun 1, 2004
    #2
    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. john
    Replies:
    0
    Views:
    367
  2. john
    Replies:
    0
    Views:
    328
  3. Brian Reaburn

    Open a new webpage from a Dropdown List item

    Brian Reaburn, May 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    568
    Ken Cox [Microsoft MVP]
    Jun 1, 2004
  4. =?Utf-8?B?SmFjaw==?=

    Dropdown list - SelectedIndexChanged event doesn't fire

    =?Utf-8?B?SmFjaw==?=, Mar 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,495
    =?Utf-8?B?SmFjaw==?=
    Mar 14, 2005
  5. =?Utf-8?B?Q2hyaXMgTGFuZQ==?=

    Dropdown selectedindexchanged event firing when submit button clic

    =?Utf-8?B?Q2hyaXMgTGFuZQ==?=, Apr 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,677
    =?Utf-8?B?Q2hyaXMgTGFuZQ==?=
    Apr 6, 2005
Loading...

Share This Page