|
-
Feb 20th, 2001, 01:23 PM
#1
Thread Starter
Lively Member
Hi,
Does anyone know the code (html or javascript) for redirecting the browser to another page as soon as an item is selected on a combobox?
Thanx.
-
Feb 20th, 2001, 08:06 PM
#2
Fanatic Member
Lets say the combobox contains ACTUAL web addresses
so then you'd have
Code:
in the script itself
<script language="vbscript" event="onclick" for="mycombo">
window.navigate "'" & mycombo.value & "'"
</script>
and for the combo box
Code:
<select id="mycombo">
etc etc etc
DocZaf
{;->
-
Feb 21st, 2001, 09:35 AM
#3
Frenzied Member
This will work in Netscape as well as Internet Exploiter
Code:
<HTML>
<BODY>
<FORM NAME="frm1">
<SELECT NAME="s1" onChange="self.location = this.options[this.selectedIndex].value;">
<OPTION VALUE="http://forums.vb-world.net">VB World
<OPTION VALUE="http://search.microsoft.com/us/dev/default.asp">MSDN
</SELECT>
</form>
</BODY>
</HTML>
-
Feb 21st, 2001, 03:38 PM
#4
Thread Starter
Lively Member
Thanx Mark
Thanks Mark - that did exactly what I wanted!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|