Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/08/2013, 21:16
TEXT
 
Fecha de Ingreso: agosto-2013
Ubicación: Puebla
Mensajes: 6
Antigüedad: 10 años, 8 meses
Puntos: 0
Respuesta: Multiples Menus de salto con un solo BOTON DE SUBMIT

PERFECTO, SI YA ENTENDI, YA OBTUVE MI TERCER, y Y YA ME PUDO FUNCIONAR BIEN..

MUCHAS GRACIAS Y DEJO EL CODIGO POR SI ALGUIEN MAS LO NECESITA.

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>

</head>

<body>

<script type="text/javascript">


function MM_resolveTargetUrl(firstObjId,secondObjId,tercerObjId,targ,restore){

var firstSelObj = null;
var secondSelObj = null;
var tercerSelObj = null;


with (document){

if (getElementById) {

firstSelObj = getElementById(firstObjId);
secondSelObj = getElementById(secondObjId);
tercerSelObj = getElementById(tercerObjId);
}// end if

// WARNING: The following logic will only work if the initial values of the dropdown boxes are ---TEST1--- and ---TEST2---
// Change the if condition if the initial values are something else!!
if (firstSelObj.value == "---TEST1---"){ // user has not selected from first dropdown
if (secondSelObj.value == "---TEST2---") { // user has not selected from the second dropdown
if (tercerSelObj.value == "---TEST3---") { // user has not selected from the second dropdown

alert("Please select an option from the dropdown menus!");
return
}// end nested if

else { // user has selected from the second dropdown

eval(targ+".location='"+tercerSelObj.options[tercerSelObj.selectedIndex].value+"'");
if (restore) tercerSelObj.selectedIndex=0;
if (restore) firstSelObj.selectedIndex=0;
if (restore) secondSelObj.selectedIndex=0;
return;
}// end else
}// end with
else { // user has selected from the first dropdown

eval(targ+".location='"+secondSelObj.options[secondSelObj.selectedIndex].value+"'");
if (restore) tercerSelObj.selectedIndex=0;
if (restore) firstSelObj.selectedIndex=0;
if (restore) secondSelObj.selectedIndex=0;
return;
}// end nested else
}// end if
else { // user has selected from the first dropdown

eval(targ+".location='"+firstSelObj.options[firstSelObj.selectedIndex].value+"'");
if (restore) tercerSelObj.selectedIndex=0;
if (restore) firstSelObj.selectedIndex=0;
if (restore) secondSelObj.selectedIndex=0;
return;
}// end else
}// end with
}



</script>
</head>

<body>
<form name="form" id="form" accept-charset="" >


<select name="jumpMenu" id="jumpMenu" style="background-color:#fff; width:150px; color:#666;">
<option selected = "TEST1" class="red" style="font-size: 0.9em; font-family: Arial; text-indent:0.3em; ">---TEST1---</option>
<option value="http://www.google.com" style="font-size: 0.9em; font-family: Arial;">GOOGLE</option>
</select>



<select name="jumpMenu2" id="jumpMenu2" style="background-color:#000; width:150px; color:#CCC;">
<option selected = "TEST2" style="font-size: 0.9em; font-family: Arial;">---TEST2---</option>
<option value="http://www.yahoo.com" style="font-size: 0.9em; font-family: Arial;">YAHOO</option>
</select> 


<select name="jumpMenu3" id="jumpMenu3" onchange="MM_jumpMenu('parent',this,0)"style="background-color:#fff; width:150px; color:#666;" >
  <option selected = "TEST3">---TEST3----</option>
    <option  value="http://www.bing.com">BING</option>
</select>


<input type="button" name="go_button" id= "go_button" value="Go" onClick="MM_resolveTargetUrl('jumpMenu','jumpMenu2','jumpMenu3','parent',1)" >
</legend>
</form>
</body>
</html>