Foros del Web » Creando para Internet » Diseño web »

Formularios HTML

Estas en el tema de Formularios HTML en el foro de Diseño web en Foros del Web. Alguien me puede ayudar. Tengo problemas con una página HTML donde tengo un botón que ejecuta un proceso, pero al pulsar el botón no se ...
  #1 (permalink)  
Antiguo 14/07/2009, 01:19
 
Fecha de Ingreso: julio-2009
Mensajes: 1
Antigüedad: 14 años, 9 meses
Puntos: 0
Formularios HTML

Alguien me puede ayudar. Tengo problemas con una página HTML donde tengo un botón que ejecuta un proceso, pero al pulsar el botón no se ejecuta el proceso. Tiene que ser porque el código no estará bien escrito. Pego debajo el código por si alguien me puede decir que es lo que está mal. La zona en negrita es donde se encuentra el botón que quiero que ejecute el proceso.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>#AVP$NOMBRE-WEB$</title>
<script language="JavaScript" src="AticaCookie.js"></script>
<meta http-equiv=expires content=now></meta>
<meta http-equiv=pragma content=no-cache></meta>
<link rel="stylesheet" type="text/css" href="estilo1.css"></link>

<base target="KB_Hist"></base>
<style type="text/css">
<!--
.Estilo5 {
color: #FFFFFF;
font-weight: bold;
font-size: 24px;
}
-->
</style>
</head>

<body>

<table width="858" border="0" align="center">
<tr>
<td width="858" bgcolor="#3300FF"><div align="center" class="Estilo5">INCIDENCIAS MANTENIMIENTO</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>

<table width="707" height="80" border="3" align="center" bordercolor="#660066">
<tr>
<td width="693" height="70">

<table width="569" border="0" align="center">
<tr>
<td width="95">Cliente</td>
<td width="464"><input typr="TEXT" name="PERNOMBRE" value="#AVP'persona'" readonly size="80"></input></td>
</tr>

</table>

</td>
</tr>
</table>
<table width="803" border="0" align="center">

<tr>
<td width="652"> </td>
<td width="141"> </td>
</tr>
<tr>
<td> </td>
<td><input name="Volver" type="submit" value="Volver Menu Anterior" onclick="history.back(-1);"/></td>
</tr>
</table>
<table width="802" border="0" align="center">

<tr>
<td width="654"> </td>
<td width="138"> </td>
</tr>

</table>

<table width="1061" height="45" border="2" align="center" bordercolor="#6666FF">



<tr>
<td width="138">Revisado</td>
<td>Tarea</td>
<td>Explicaciones</td>
<td>Tipo Tarea</td>
<td>Equipo / Usuario Asociado</td>
</tr>

<form method="POST" action="TAR-LISTA-MANTENIMIENTO-FIN.pro" target="_self" onsubmit="return checkForm();">
<tr>

<td><select name="wopcion" class="Dynamic_NormalComboBox">
<option value="A">SI</option>
<option value="B">NO</option>
<option value="C">SI CON ERRORES</option>
</select></td>
<td width="158"><input name="wtarea" type="TEXT" value="#AVP%TAREAS.SER-EJE-NUM%" size="10" readonly="readonly"></input></td>
<td width="333"><textarea name="wdescripcion" cols="40">#AVP%EXPLIC%</textarea></td>
<td width="158"><input name="webcontacto" type="TEXT" value="#AVP%TIP-TAR.NOMBRE%" size="21" readonly="readonly"></input></td>
<td width="399"><input name="wnombre" type="TEXT" value="#AVP%EQ-ASO%" size="60" readonly="readonly"></input></td>
<td><input type="submit" value="ACTUALIZAR"/></td>
</tr>

</form>
</table>

</tr>
</table>

<table width="802" border="0" align="center">
<tr>
<td width="651"> </td>

</tr>
<tr>
<td width="651"> </td>
<td><input name="Volver" type="submit" value="Volver Menu Anterior" onclick="history.back(-1);"/></td>

</tr>

</table>

</body>

</html>
  #2 (permalink)  
Antiguo 14/07/2009, 10:20
Avatar de maycol_alvarez  
Fecha de Ingreso: julio-2009
Mensajes: 31
Antigüedad: 14 años, 9 meses
Puntos: 1
Respuesta: Formularios HTML

Veo muchos errores, por ejemplo no puedes anidar un formulario dentro de un table y romper la secuencia de filas, una de dos, o anidas la tabla en el formulario, o declaras el form dentro de un TD.

la línea history.back(-1); sólo funciona con pocos navegadores, pero deberías incluirla dentro de la función que evalúa el formulario "checkForm()", porque si no la pagina se dirige hacia atrás antes de que logre enviar el form.

Código:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>#AVP$NOMBRE-WEB$</title>
<script language="JavaScript" src="AticaCookie.js"></script>
<meta http-equiv=expires content=now></meta>
<meta http-equiv=pragma content=no-cache></meta>
<link rel="stylesheet" type="text/css" href="estilo1.css"></link>

<base target="KB_Hist"></base>
<style type="text/css">
<!--
.Estilo5 {
color: #FFFFFF;
font-weight: bold;
font-size: 24px;
}
-->
</style>
</head>

<body>
<form method="POST" action="TAR-LISTA-MANTENIMIENTO-FIN.pro" target="_self" onsubmit="return checkForm();">
<table width="858" border="0" align="center">
<tr>
<td width="858" bgcolor="#3300FF"><div align="center" class="Estilo5">INCIDENCIAS MANTENIMIENTO</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>

<table width="707" height="80" border="3" align="center" bordercolor="#660066">
<tr>
<td width="693" height="70">

<table width="569" border="0" align="center">
<tr>
<td width="95">Cliente</td>
<td width="464"><input typr="TEXT" name="PERNOMBRE" value="#AVP'persona'" readonly size="80"></input></td>
</tr>

</table>

</td>
</tr>
</table>
<table width="803" border="0" align="center">

<tr>
<td width="652"> </td>
<td width="141"> </td>
</tr>
<tr>
<td> </td>
<td><input name="Volver" type="submit" value="Volver Menu Anterior" onclick="history.back(-1);"/></td>
</tr>
</table>
<table width="802" border="0" align="center">

<tr>
<td width="654"> </td>
<td width="138"> </td>
</tr>

</table>

<table width="1061" height="45" border="2" align="center" bordercolor="#6666FF">



<tr>
<td width="138">Revisado</td>
<td>Tarea</td>
<td>Explicaciones</td>
<td>Tipo Tarea</td>
<td>Equipo / Usuario Asociado</td>
</tr>


<tr>

<td><select name="wopcion" class="Dynamic_NormalComboBox">
<option value="A">SI</option>
<option value="B">NO</option>
<option value="C">SI CON ERRORES</option>
</select></td>
<td width="158"><input name="wtarea" type="TEXT" value="#AVP%TAREAS.SER-EJE-NUM%" size="10" readonly="readonly"></input></td>
<td width="333"><textarea name="wdescripcion" cols="40">#AVP%EXPLIC%</textarea></td>
<td width="158"><input name="webcontacto" type="TEXT" value="#AVP%TIP-TAR.NOMBRE%" size="21" readonly="readonly"></input></td>
<td width="399"><input name="wnombre" type="TEXT" value="#AVP%EQ-ASO%" size="60" readonly="readonly"></input></td>
<td><input type="submit" value="ACTUALIZAR"/></td>
</tr>


</table>

</tr>
</table>

<table width="802" border="0" align="center">
<tr>
<td width="651"> </td>

</tr>
<tr>
<td width="651"> </td>
<td><input name="Volver" type="submitdebería ser button" value="Volver Menu Anterior" onclick="history.back(-1);//NO"/></td>

</tr>

</table>
</form>
</body>

</html>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:41.