To create an drop-down box you need something like this:
Code:
<select id="ourSelect">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
You will need to use JavaScript to make it into an array, or to make a drop-down menu from an array. What exactly do you need it to do?
To read from an array, do something like this:
Code:
<script type="text/javascript">
function fillArray() {
var myCars=new Array("Saab","Volvo","BMW");
document.Write('<select id="ourSelect">');
document.Write('<option value="1">'+myCars[0]+'</option>');
document.Write('<option value="2">'+myCars[1]+'</option>');
document.Write('<option value="2">'+myCars[2]+'</option>');
document.Write('</select>');
}
</script>
The at the top of your code put:
Code:
<body onload="fillArray();">
Bookmarks