Pronunciation / adjective
Bringing something good and unforseen.
    Skip Navigation Links > Code Repository
   

Open web page from drop down list



 
Return

Open web page from drop down list

This javascript automatically redirects a user to any web page when they select an entry from a drop down list.

  1. <html>
  2. <head>
  3. <title>Open From Drop Down</title>
  4. </head>
  5. <body>
  6. <script language="javascript">
  7. <!--
  8. function go(what)
  9. {
  10. value = what.options[what.selectedIndex].value;
  11. if (value == '') return;
  12. window.location.href = value;
  13. }
  14. //-->
  15. </script>
  16. <form name="form1">
  17. <p align="center">
  18. <select name="imagelist" onChange="go(this)">
  19. <option value="">Please Select a Web Site</option>
  20. <option value="http://www.aboutfortunate.com">www.aboutfortunate.com</option>
  21. <option value="http://www.msn.com">www.msn.com</option>
  22. </select>
  23. </form>
  24. </body>
  25. </html>


Return
Microsoft Certified Professional   © 2018 Fortunate.  All rights reserved.
contact: justin@aboutfortunate.com