Utilizo el siguiente codigo para cargar una pagina en base a dos selct.
Código:
function check_form_ficha(rubro,nivel){
if(document.getElementById(rubro).value==1&&document.getElementById(nivel).value>=2){
document.getElementById("form_ficha").style.display="block";
if(document.getElementById("form_ficha").innerHTML==""){
ajaxload("form_ficha","ajax/ficha_camping.php");
}else{
}
}else{
document.getElementById("form_ficha").style.display="none";
}
}
Pero quiero agregarle que si se da otra combinacion muestre otro archivo, es por esto que probe lo siguiente.
Código:
function check_form_ficha(rubro,nivel){
if(document.getElementById(rubro).value==1&&document.getElementById(nivel).value>=2){
document.getElementById("form_ficha").style.display="block";
if(document.getElementById("form_ficha").innerHTML==""){
ajaxload("form_ficha","ajax/ficha_camping.php");
}else{
}
if(document.getElementById(rubro).value>=1&&document.getElementById(nivel).value==3){
document.getElementById("form_ficha").style.display="block";
if(document.getElementById("form_ficha").innerHTML==""){
ajaxload("form_ficha","plantillas/usuarios_registro_establecimiento_beneficios_form.html");
}else{
}
}
}else{
document.getElementById("form_ficha").style.display="none";
}
}
Pero no me funciono.
Alguna ayuda.
Muchas gracias