Ver Mensaje Individual
  #20 (permalink)  
Antiguo 07/02/2006, 06:42
mawi
 
Fecha de Ingreso: febrero-2006
Mensajes: 32
Antigüedad: 18 años, 2 meses
Puntos: 0
Pregunta

Hola a todos!!
La tabla la prefiero hacer en php pq mas o menos algo se (bueno toy aprediendo) pero esq de javascript no hecho nunca nada y supongo q me resultaria mas dificil, aisq no me importa recargar la pagina, es mas como yo lo empece hacer fue asi pero no me funcionaba pq no me hacia ni caso cuando selecionaba un servicio entonces claro nose cargaba la nueva fila de la tabla.
Os pongo el codigo de lo q hice aunq tiene fallos pero asi os haceis una idea:
<form method="post" action="$PHP_SELF?accion=vertipo">
<table width="756" border="1" cellspacing="0" cellpadding="0" bordercolor="#f7f7f7" align="center">
<div align="center"><font face="Tahoma, Verdana, Arial, Helvetica, sans-serif" size="2" color="#003399"><b> &nbsp;INFORMACION PARA LAS LICENCIAS, SERVICIOS O GESTION DE UN EQUIPO </b></font><br><br>
</div>
<tr><div align="left">
<font size="2" color="#006699"><b>Servicios:</b></font>
<select><option selected>"NINGUNO"
<option>Mantenimiento Hardware</option>
<option>Licencia</option>
<option>Gestión/Administración</option>
<option>Antispy</option>
<option>Antivirus</option>
<option>IDS/IPS</option>
</select>
<input type="submit" name="Submit" value="Seleccionar" id="servicios">
</div>
</tr>
</form>
if($_GET['accion']=="vertipo"){
//dependiendo del servicio q selecionemos se iran añadiendo filas a la tabla:
$tiposervicio=$_POST['servicio'];
if($tiposervicio=="Mantenimiento Hardware"){
<form method="post" action="$PHP_SELF?accion=hacernuevo">
<table width="756" border="1" cellspacing="0" cellpadding="0" bordercolor="#f7f7f7" align="left">
<div align="left"><font face="Tahoma, Verdana, Arial, Helvetica, sans-serif" size="2" color="#003399"><b> &nbsp;INFORMACION PARA LAS LICENCIAS, SERVICIOS O GESTION DE UN EQUIPO </b></font><br><br>
</div>
<tr>
<td width="664" bgcolor="#f7f7f7"></td>
</tr>
<tr>
<th><td width="100"><div align="left"><font face="Tahoma, Arial, Verdana" color="#000033" size="2" ><b>Servicio:</b>
</font></div></td></th>
..................
</tr>
<tr>
<td><div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><strong>$tipo</strong></font></div></td>
<td>................
</tr>
</table>
HTML;
}//fin del if del servicio Mantenimiento hardware

if($tiposervicio=='Licencia'){
..................
}
if($tiposervicio=='Gestion/Administracion'){
...............
}
if($tiposervicio=='Antispy'){
.........................
}
if($tiposervicio=='Antivirus'){
....................
}
if($tiposervicio=='IDS/IPS'){
........................
}
if($_GET['accion']=="hacernuevo"){

$tipoEq=$_POST['tipoEq'];
.................
}

Bueno va mas o menos asi.
Gracias