Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2005
    Posts
    735
    Thanks
    4
    Thanked 1 Time in 1 Post

    script for <select> value

    How do I make the selection go to the assigned value?
    Code:
    <select onchange="go();">
    <option value="/wheelofgod/tableformat.asp?page=1&sort=&keyword=jesus&text_data=yes&optAction=on">1</option>
    <option value="/wheelofgod/tableformat.asp?page=2&sort=&keyword=jesus&text_data=yes&optAction=on">2</option>
    <option value="/wheelofgod/tableformat.asp?page=3&sort=&keyword=jesus&text_data=yes&optAction=on">3</option>
    <option value="/wheelofgod/tableformat.asp?page=4&sort=&keyword=jesus&text_data=yes&optAction=on">4</option>
    <option </select>

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script type="text/javascript">
    function goTo(where)
    {
    	window.location = where;
    	return false;
    }
    </script>
    </head>
    
    <body>
    <form action="#" method="post" onSubmit="return goTo(this.menu.options[this.menu.options.selectedIndex].value)">
    <select name="menu" onChange="go(this.options[this.options.selectedIndex].value);">
    <option value="/wheelofgod/tableformat.asp?page=1&sort=&keyword=jesus&text_data=yes&optAction=on">1</option>
    <option value="/wheelofgod/tableformat.asp?page=2&sort=&keyword=jesus&text_data=yes&optAction=on">2</option>
    <option value="/wheelofgod/tableformat.asp?page=3&sort=&keyword=jesus&text_data=yes&optAction=on">3</option>
    <option value="/wheelofgod/tableformat.asp?page=4&sort=&keyword=jesus&text_data=yes&optAction=on">4</option>
    </select>
    <input type="submit" value="Go">
    </form>
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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