SuperSal
Programmer
- Mar 13, 2007
- 33
Hiya everyone, just wondered if anyone knows how to get the values from an array from an external javascript file into a combo/list box. The whole idea is that the javascript file will contain all the fields needed for all the comboboxes and this file will be used by a large number of interfaces.
say I had a settings.js file with this array:
var JPEGHighRes = new Array("1600x1200", "800x600", "640x480")
could i get these values into a combobox like below?
<select name="comboJHigh" id="comboJHigh">
<option value="0">JPEGHighRes[0]</script></option>
<option value="1">JPEGHighRes[2]</option>
<option value="2">JPEGHighRes[2]</option></select>
I have tried various ways but not successfully so if anyone has any ideas then let me know
Thanks
Sally
say I had a settings.js file with this array:
var JPEGHighRes = new Array("1600x1200", "800x600", "640x480")
could i get these values into a combobox like below?
<select name="comboJHigh" id="comboJHigh">
<option value="0">JPEGHighRes[0]</script></option>
<option value="1">JPEGHighRes[2]</option>
<option value="2">JPEGHighRes[2]</option></select>
I have tried various ways but not successfully so if anyone has any ideas then let me know
Thanks
Sally