tuncerf
09-11-2006, 06:52 AM
Hi all,
I hava 2 comboboxes, one of which changes its options according to selected value of the other by javascipting.
<script language='JavaScript' type='text/javascript'>
<!--
function changeMenu(value){
var i=value ;
i++ ;
for(var j=0; i < 24; i++,j++){ document.editConstraint.selectTime_to.options[j] = new Option(i,i);
if((value!=0) && (i==23)){
j++;
document.editConstraint.selectTime_to.options[j] = new Option(0,0);
}
}
}
-->
</script>
Well in first time if I choose 2 in first combobox,the second one shows values between 2 and 23 and also 0.This is what i want.But then if I choose 16 in first before submitting the first selection, the second one shows 17-23 ,0 and 11-23 also a 0.How can i fix the length of the combobox to not to show 11-23 and last 0 which remain from first selection?
I hava 2 comboboxes, one of which changes its options according to selected value of the other by javascipting.
<script language='JavaScript' type='text/javascript'>
<!--
function changeMenu(value){
var i=value ;
i++ ;
for(var j=0; i < 24; i++,j++){ document.editConstraint.selectTime_to.options[j] = new Option(i,i);
if((value!=0) && (i==23)){
j++;
document.editConstraint.selectTime_to.options[j] = new Option(0,0);
}
}
}
-->
</script>
Well in first time if I choose 2 in first combobox,the second one shows values between 2 and 23 and also 0.This is what i want.But then if I choose 16 in first before submitting the first selection, the second one shows 17-23 ,0 and 11-23 also a 0.How can i fix the length of the combobox to not to show 11-23 and last 0 which remain from first selection?