Results 1 to 2 of 2

Thread: Links an Chained Selects.

  1. #1
    Join Date
    Jul 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Links an Chained Selects.

    Hello, I was wondering how to do this: I have my chained selects script I downloaded all set up but I wan the end links to link to certain webpages. What would the code be to click submit and have it go to a certain page based on the end selection?

    Thanks

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    <script type="text/javascript">
    /*<![CDATA[*/
    function Link(sel){
    var url=sel.value
     if (url) sel.form.action=url;//window.top.location=url;
    }
    /*]]>*/
    </script></head>
    
    <body>
    <form >
    <select onchange="Link(this);">
    <option value="" >Select</option>
    <option value="http://www.vicsjavascripts.org.uk/" >Vics Javascripts</option>
    <option value="http://www.dynamicdrive.com/" >Dynamic Drive</option>
    </select>
    <input type="submit" name="" value="Submit" />
    </form>
    </body>
    
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •