Results 1 to 4 of 4

Thread: Redirection

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    94

    Smile

    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.

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    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
    {;->

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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>
    Mark
    -------------------

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    94

    Thumbs up 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
  •  



Click Here to Expand Forum to Full Width