Forums

chained dynamic double dropdowns

teldrive 08 Mar, 2015
Hi anybody,
trying to get a more interactive form I am pursuing to chain two dynamic double dropdowns(that works fine individually)
I have got they are in the same form with some JavaScript code("selección" is the global variable that is passed to ajax)
function igual1(){
$('seleccion').value=$('provincia1').value;
}
function igual2(){
$('seleccion').value=$('provincia2').value;
}

the new challenge is how can I chain them: if i select provincia1 and after hospital1 how to get the same values on next "double dropdown" provincia2->hospital2 (actually there are 6 more)
I have tried with some JavaScript code but I am lost
[attachment=0]Captura.JPG[/attachment]
This topic is locked and no more replies can be posted.