Este es el código:
Código Javascript:
Ver original
<script type="text/javascript"> function comprobar(){ var titulacion = document.getElementById('titulacion'); var rango = document.getElementById('rango'); if(rango.value == 1) { titulacion.style.display = 'block'; } else { titulacion.style.display = 'none'; } } </script>
Código HTML:
Ver original
<form action="kiosk.php" method="post" class="form" id="form1"><?php <p> <label> <select onchange="comprobar();" name="rango" id="rango" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Elegir Mutual" required/>> </select> </label> </p> <div id="titulacion"> <label> <select name="origen" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="ORIGEN" id="comment" required/> <?php $localidades = mysqli_query($dbservidor2,"SELECT * from localidades order by localidad"); while ($resultado = mysqli_fetch_array($localidades)){ ?> <?php } ?> </select> <select name="destino" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="DESTINO" id="comment" required/> <?php $localidades = mysqli_query($dbservidor2,"SELECT * from localidades order by localidad"); while ($resultado = mysqli_fetch_array($localidades)){ ?> <?php } ?> </select> <input type="text" pattern="[1-9]" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" name="cantidad" id="comment" placeholder="CANTIDAD DE BOLETOS" required /> </label> </div> <div class="submit"> <input type="submit" value="IMPRIMIR COMPROBANTE" id="button-blue"/> </div> </form>