gszauer
01-10-2007, 08:33 PM
<script language="Javascript" type="text/javascript">
<!-- Hide from older browsers
a0 = new array(
new Array("title", "url"),
new Array("title2", "url"),
new Array("title3", "url")
)
function changeMenu (arrayName){
selected = document.mainDcument.categories.options[document.mainDcument.categories.selectedIndex].value
if (selected != ""){
selectedValue = parseInt(selected)
document.mainDcument.playlist.options.length = 0
for (i=0; i<=arrayName.length ; i++){
document.mainDcument.playlist.options[i] = new Option(arrayName[i][0])
// arrayName[i][0]
//document.mainDcument.playlist.options[i].value = i
}
}
}
// end hiding script -->
</script>
If i replace
document.mainDcument.playlist.options[i] = new Option(arrayName[i][0])
with
document.mainDcument.playlist.options[i] = new Option("Dummy")
The script works just fine, but otherwise it refuses to populate my other list...
Can anyone please help out?
I appriciate your time
Thanks
~Gabor
<!-- Hide from older browsers
a0 = new array(
new Array("title", "url"),
new Array("title2", "url"),
new Array("title3", "url")
)
function changeMenu (arrayName){
selected = document.mainDcument.categories.options[document.mainDcument.categories.selectedIndex].value
if (selected != ""){
selectedValue = parseInt(selected)
document.mainDcument.playlist.options.length = 0
for (i=0; i<=arrayName.length ; i++){
document.mainDcument.playlist.options[i] = new Option(arrayName[i][0])
// arrayName[i][0]
//document.mainDcument.playlist.options[i].value = i
}
}
}
// end hiding script -->
</script>
If i replace
document.mainDcument.playlist.options[i] = new Option(arrayName[i][0])
with
document.mainDcument.playlist.options[i] = new Option("Dummy")
The script works just fine, but otherwise it refuses to populate my other list...
Can anyone please help out?
I appriciate your time
Thanks
~Gabor