redirect url using javascript in drop down list

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • timothy ma and constance lee

    #1

    redirect url using javascript in drop down list

    Sirs

    How can i use javascript to redirect the url in the drop list box once the
    event onchnage is triggered?


  • kaeli

    #2
    Re: redirect url using javascript in drop down list

    In article <xfJad.718118$g E.53400@pd7tw3n o>, timcons1@shaw.c a enlightened us
    with...[color=blue]
    > Sirs
    >
    > How can i use javascript to redirect the url in the drop list box once the
    > event onchnage is triggered?
    >
    >
    >[/color]

    <select onChange="goThe re(this.options[this.selectedIn dex].value)" name="s1">
    <option value="http://someurl.com">pl ace1</option>
    <option value="http://someurl2.com">p lace2</option>
    <option value="http://someur3.com">pl ace3</option>
    </select>

    <script type="text/javascript">
    function goThere(loc)
    {
    window.location .href=loc;
    }
    </script>

    Oh, and I'm a 'miss', thank you. ;)

    --
    --
    ~kaeli~
    The Bible contains six admonishments to homosexuals and
    three hundred sixty-two admonishments to heterosexuals.
    That doesn't mean that God doesn't love heterosexuals. It's
    just that they need more supervision.



    Comment

    Working...