Open a new webpage On SelectedIndexChanged (Dropdown)

B

Brian Reaburn

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
 
V

Vidar Petursson

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
==============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top