Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/05/2007, 12:06
Avatar de .php
.php
 
Fecha de Ingreso: julio-2006
Mensajes: 481
Antigüedad: 17 años, 9 meses
Puntos: 5
Re: Crear tantos textbox como indique la opcion elegida en una lista select

bueno, si no lo quieres hacer con ajax,
hazlo con php, tambien es facil
Código PHP:

<form name="form1" method="POST">
<td colspan="6"><div align="center">Nº Cursos
<select size="1" name="num_cursos" onchange="submit()">
<option value="" selected>Elige opción...</option>
<?php $i=0;while($i<11){echo '<option value='.$i.'>'.$i.'</option>';$i++;}?>
</select></div></td>
<?
if($_POST["num_cursos"]!=""){
    
$j    =    $_POST["num_cursos"];
    
$i    =    0;
    echo 
"<table>";
    while(
$i<$j){
        echo 
'<tr><td><input type=text></td></tr>';
        
$i++;
    }
    echo 
"</table>";
}
?>
</form>
__________________
~~[FiDeLio]~~