Ver Mensaje Individual
  #9 (permalink)  
Antiguo 09/07/2003, 09:38
Avatar de Kaopectate
Kaopectate
Colaborador
 
Fecha de Ingreso: diciembre-2001
Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 23 años, 2 meses
Puntos: 38
Hola dobled.

Pruébalo asi:

Código PHP:
<html>
 <
head>
  <
script language="JavaScript">
   function 
FValidateControl3(control,nombre){
    if (
control.value==""){
     
alert(nombre+" es un campo requerido y debe ingresarse.");
     
control.focus();
     return 
false;
    }
    return 
true;
   }

   function 
FSubmitValidation3(form) {
    var 
nTexts parseInt(document.frm.selNumeroDeCombos[document.frm.selNumeroDeCombos.selectedIndex].value10);
    for (var 
0nTextsi++){
     
oCntrl document.getElementById("Texto" String(i));
     if (!
FValidateControl3(oCntrl,"Texto" String(i)))
      return 
false;
    }
    return 
true;
   }
  
</script>
 </head>
 <body>
  <form name="frm">
    <select name="selNumeroDeCombos">
     <option value="0"></option>
     <option value="1">1</option>
     <option value="2">2</option>
     <option value="3">3</option>
     <option value="4">4</option>
    </select><br>
   <input type="text" id="Texto0"><br>
   <input type="text" id="Texto1"><br>
   <input type="text" id="Texto2"><br>
   <input type="text" id="Texto3"><br>
   <input type="button" name="btn" value="Valida" onclick="FSubmitValidation3(document.frm)"> 
  </form>
 </body>
</html> 
Saludos.