See the sample below. Maybe Not Sure You got correct and incorrect. This JavaScript may be placed at any location in your web page. Make sure that the form is placed where you want the select box. The form does not have to be right under the script.
Comments are there for documentation purposes only.
Comments are not included in the actual code itself. For more advanced programmers, this script can be used in addition to other scripts. The Source Script Below is a working script that can be copied off this page, modified, and used. Simply copy and paste this into your web page. Maybe Not Sure You got correct and incorrect.