Groups | Blog | Home
all groups > asp.net webcontrols > may 2004 >

asp.net webcontrols : Open a new webpage On SelectedIndexChanged (Dropdown)


Brian Reaburn
5/31/2004 9:19:26 AM
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
6/1/2004 9:44:25 AM
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/default.asp?url=/workshop/author/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
==============================
[quoted text, click to view]

AddThis Social Bookmark Button