rcmsjPJ 2 de mai. de 2005
faço isso direto no JavaScript …
… olha a função aí:
function popularFilho(){
valorPai = window.document.frmTeste.optPrincipal.value;
if(valorPai==1){
window.document.frmTeste.optSub.options.length = 0;
window.document.frmTeste.optSub.options.add(new Option('Gol','1'));
window.document.frmTeste.optSub.options.add(new Option('Polo','2'));
window.document.frmTeste.optSub.options.add(new Option('Fusca','3'));
}else if(valorPai==2){
window.document.frmTeste.optSub.options.length = 0;
window.document.frmTeste.optSub.options.add(new Option('Monza','1'));
window.document.frmTeste.optSub.options.add(new Option('Vectra','2'));
window.document.frmTeste.optSub.options.add(new Option('Chevette','3'));
}else if(valorPai==3){
window.document.frmTeste.optSub.options.length = 0;
window.document.frmTeste.optSub.options.add(new Option('Escort','1'));
window.document.frmTeste.optSub.options.add(new Option('Maverick','2'));
window.document.frmTeste.optSub.options.add(new Option('Mondeo','3'));
}else{
window.document.frmTeste.optSub.options.length = 0;
}
}
RockerPJ 4 de mai. de 2005
“rcmsj”:
faço isso direto no JavaScript …
… olha a função aí:
function popularFilho(){
valorPai = window.document.frmTeste.optPrincipal.value;
if(valorPai==1){
window.document.frmTeste.optSub.options.length = 0;
window.document.frmTeste.optSub.options.add(new Option('Gol','1'));
window.document.frmTeste.optSub.options.add(new Option('Polo','2'));
window.document.frmTeste.optSub.options.add(new Option('Fusca','3'));
}else if(valorPai==2){
window.document.frmTeste.optSub.options.length = 0;
window.document.frmTeste.optSub.options.add(new Option('Monza','1'));
window.document.frmTeste.optSub.options.add(new Option('Vectra','2'));
window.document.frmTeste.optSub.options.add(new Option('Chevette','3'));
}else if(valorPai==3){
window.document.frmTeste.optSub.options.length = 0;
window.document.frmTeste.optSub.options.add(new Option('Escort','1'));
window.document.frmTeste.optSub.options.add(new Option('Maverick','2'));
window.document.frmTeste.optSub.options.add(new Option('Mondeo','3'));
}else{
window.document.frmTeste.optSub.options.length = 0;
}
}
Não existe um jeito de fazer isso no Action?
RockerPJ 4 de mai. de 2005
Blz pessoal, já consegui fazer o que queria aqui, tive que testar várias coisas e muitas foram sem exito até que finalmente achei a solução.
Obrigado aos que tentaram me ajudar.