function selectA() {
var selA = document.test.typeA.value;
var objB = document.test.typeB;
objB.options.length = 0;
if (selA=='A') {
objB.options[0] = new Option('A1','A1');
objB.options[1] = new Option('A2','A2');
objB.options[2] = new Option('A3','A3');
}else if (selA=='B') {
objB.options[0] = new Option('B1','B1');
objB.options[1] = new Option('B2','B2');
objB.options[2] = new Option('B3','B3');
}else if (selA=='C') {
objB.options[0] = new Option('C1','C1');
objB.options[1] = new Option('C2','C2');
objB.options[2] = new Option('C3','C3');
}
}
</script>
test is the name of my form and typeA is the first Combo box and typeB is the second combo box, also you can call this function with one button and one combo box, if you have any question please email me
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.