W
William
Is there a maximum number of allowable drop down menu items? Is this governed
by some memory configuration somewhere?
I'm trying to create dynamically a drop-down menu of 489 items. The following
script works fine with a few items, but does nothing when presented with all
of them.
<script type='text/javascript'>
function makeMenu() {
var w = document.getElementById('rmtoc')
var k = w.options[w.selectedIndex].value
if (k==0) {
var s = new Array()
s[0] = 'Choice 1'
s[1] = 'Choice 2'
s[2] = 'Choice 3'
s[3] = 'Choice 4'
s[4] = 'Choice 5' //etc., etc.; choices are assembled with PHP
for(i=0;i<s.length;i++) {
document.forms['barform'].showpop.options = new Option(s)
}
}
}
</script>
Thanks!
Wm
by some memory configuration somewhere?
I'm trying to create dynamically a drop-down menu of 489 items. The following
script works fine with a few items, but does nothing when presented with all
of them.
<script type='text/javascript'>
function makeMenu() {
var w = document.getElementById('rmtoc')
var k = w.options[w.selectedIndex].value
if (k==0) {
var s = new Array()
s[0] = 'Choice 1'
s[1] = 'Choice 2'
s[2] = 'Choice 3'
s[3] = 'Choice 4'
s[4] = 'Choice 5' //etc., etc.; choices are assembled with PHP
for(i=0;i<s.length;i++) {
document.forms['barform'].showpop.options = new Option(s)
}
}
}
</script>
Thanks!
Wm