Foros del Web » Programando para Internet » ASP Clásico »

2 Form en 1 asp

Estas en el tema de 2 Form en 1 asp en el foro de ASP Clásico en Foros del Web. Maestros.... pregunta del Millon de Dollares.... Puedo Integrar 2 form en 1 codigo. ??? Si se puede... alguien tiene algun Ejemplo ??? Si no se ...
  #1 (permalink)  
Antiguo 11/01/2003, 02:10
 
Fecha de Ingreso: noviembre-2002
Ubicación: Monterrey N.L. Mexico
Mensajes: 141
Antigüedad: 21 años, 7 meses
Puntos: 0
2 Form en 1 asp

Maestros.... pregunta del Millon de Dollares....

Puedo Integrar 2 form en 1 codigo. ???

Si se puede... alguien tiene algun Ejemplo ???

Si no se puede... Gracias.. por Cooperar ...

Saludos
Luis.R.Acosta
  #2 (permalink)  
Antiguo 11/01/2003, 02:31
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 22 años, 5 meses
Puntos: 1
Como que dos forms en un código?

Dos formularios en un HTML?

Si

El problema es que al dar submit solo te reconocera el form al cual pertenece el boton submit
  #3 (permalink)  
Antiguo 11/01/2003, 02:35
 
Fecha de Ingreso: noviembre-2002
Ubicación: Monterrey N.L. Mexico
Mensajes: 141
Antigüedad: 21 años, 7 meses
Puntos: 0
es que tengo un form para un combo (select) hacia una tabla de
clientes...

pero tengo duda en como integrar (insert) los demas datos del Formulario... por eso la pregunta....

podrias ayudarme ..???
  #4 (permalink)  
Antiguo 11/01/2003, 02:36
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 22 años, 5 meses
Puntos: 1
Pues la verdad es que no entiendo muy bien pero creo que lo puedes manejar todo dentro de un mismo formulario.

Intenta ser mas claro
  #5 (permalink)  
Antiguo 11/01/2003, 02:42
 
Fecha de Ingreso: noviembre-2002
Ubicación: Monterrey N.L. Mexico
Mensajes: 141
Antigüedad: 21 años, 7 meses
Puntos: 0
Mira este es mi CODIGO... y quiero Integrar las demas variables a otra tabla (Pedidos) de la misma BD....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Page-Enter" content="revealTrans(Duration=1.0,Transition=12)">
<title> AutoTransporte </title>
</head>
<body bgcolor="#FFFFFF" text="#000000" vlink="#0000FF" alink="#FF0000"><div align="center">
<table width="740" bgcolor="#FFC891" border="2" cellspacing="0" cellpadding="0">
<tr><td><Center>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="300" HEIGHT="50" id="principal" >
<PARAM NAME=movie VALUE="http://operador1/Cantu/Html/move2.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFC891> <EMBED src="http://operador1/Cantu/Html/move2.swf" quality=high bgcolor=#FE9E01 WIDTH="770" HEIGHT="740" NAME="principal"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</Center></td></tr>
<tr>
<td>
<div align="right">
<script language=JavaScript>
<!--
;today = new Date(); weekday = today.getDay();if (weekday == 6)
document.write('Sábado');if (weekday == 0) document.write('Domingo');
if (weekday == 1) document.write('Lunes');if (weekday == 2) document.write('Martes');
if (weekday == 3) document.write('Miércoles');if (weekday == 4) document.write('Jueves');
if (weekday == 5) document.write('Viernes');document.write(', '); month = today.getMonth();
if (month == 0) document.write('Enero');if (month == 1) document.write('Febrero');
if (month == 2) document.write('Marzo');if (month == 3) document.write('Abril');
if (month == 4) document.write('Mayo');if (month == 5) document.write('Junio');
if (month == 6) document.write('Julio');if (month == 7) document.write('Agosto');
if (month == 8) document.write('Septiembre');if (month == 9) document.write('Octubre');
if (month == 10) document.write('Noviembre');if (month == 11) document.write('Diciembre');
date = today.getDate(); year=today.getYear();document.write (' ', date, ', ',year);// -->
</script>
</div></td>
</tr>
</table>

<table width="740" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="116" bgcolor="#FFCC99" valign="top" align="center">
<font face="antique olive, Helvetica, sans-serif" size="3"><br><b> CLIENTES </b><br></font>
<font face="antique olive, Helvetica, sans-serif" size="2"><a href="http://operador1/cantu/html/NCliente.html">Nuevo<br></font></a>
<font face="antique olive, Helvetica, sans-serif" size="2"><a href="http://operador1/cantu/html/PEC.html">Modificacion<br></font></a>
<br><br>
<font face="antique olive, Helvetica, sans-serif" size="3"><b> PEDIDOS </b><br></font>
<font face="antique olive, Helvetica, sans-serif" size="2"><a href="http://operador1/cantu/html/Prueba_pedidos.asp">Diario<br></font></a>
<br><br>
<font face="antique olive, Helvetica, sans-serif" size="3"><b> REPORTES </b><br></font>
<font face="antique olive, Helvetica, sans-serif" size="2"><a href="http://operador1/cantu/html/PEC.html">Modificacion<br></font></a>
<br><br>
</td>
<td width="624" valign="top" align="Center">
<p><center><font face="mouser outline" size="8"><u> Pedidos </u></center></font></p>
<!-- Inicia Cuadro de Datos-->
<br>
<table border="0">
<tr>
<td>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" valign="top" align="Center">
<!-- Combox del Nombre... -->
<form name=formulario method=post action="prueba_pedidos.asp">
<font face="antique olive, Helvetica, sans-serif" size="3"><b>NOMBRE DEL CLIENTE :</b></font>
<Select Name="Eleccion">
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath("/Cantu/Bd/Trans_Cantu.mdb")
sql = "SELECT nombre FROM Clientes"
Set rs = conn.Execute(sql)
While Not rs.EOF
%>
<option value="<%=rs("Nombre")%>"><%=rs("Nombre")%> </option>
<%
rs.MoveNext
Wend
rs.Close
%>
</form>
</td>
<td width="300" valign="top" align="Center">
<font face="antique olive, Helvetica, sans-serif" size="3"><b> FECHA DE ENTREGA: </b></font><INPUT TYPE="text" NAME="Entrega" size=23>
</td>
</tr>
</table>
<br><br>
<!-- Inicia segundo Cuadro de Datos-->
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" align="Center">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp
<INPUT TYPE="text" NAME="Cajas" size=5> <font face="antique olive, Helvetica, sans-serif" size="3">CAJAS: </font>
</td>
<td width="350" align="right">
<font face="antique olive, Helvetica, sans-serif" size="3"> TRANSPORTO: </font><INPUT TYPE="text" NAME="Transp" size=23>
</td>
</tr>
</table>
<br><br>
<!-- Inicia Tercer Cuadro de Datos-->
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="250" align="left">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp
<SELECT NAME="Destino">
<OPTION Monterrey >Monterrey
<OPTION Guadalajara >Guadalajara
<OPTION Distrito Federa >Distrito Federal
</SELECT>
<font face="antique olive, Helvetica, sans-serif" size="3"> DESTINO: </font>
</td>
<td width="250" align="Center">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp
<font face="antique olive, Helvetica, sans-serif" size="3"> ESTATUS: </font>
<SELECT NAME="status">
<OPTION Entregado >Entregado
<OPTION Pendiente >Pendiente
</SELECT>
</td>
</tr>
</table>
<br><br>
<%dim fecha
Fecha = FormatDateTime(Date,0)
%>
<center>
<input type="submit" name="Submit" value="Grabar">&nbsp;&nbsp;<INPUT TYPE="reset" VALUE="Limpiar">
</Center>


</table>
</table>
</body>
</html>
  #6 (permalink)  
Antiguo 11/01/2003, 02:52
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 22 años, 5 meses
Puntos: 1
Pues creo que te estas complicando mucho la vida.

Mete todo los elementos del formulario dentro de las etiquetas <form></form>

No debe haber ningun problema con ello, de hecho no se por que tu duda en separar los elementos.

Weno me voy a dormir.

Saludos
  #7 (permalink)  
Antiguo 11/01/2003, 02:59
 
Fecha de Ingreso: noviembre-2002
Ubicación: Monterrey N.L. Mexico
Mensajes: 141
Antigüedad: 21 años, 7 meses
Puntos: 0
Gracias URJose... Lo Intentare Mientas Duremes...



Saludos
Luis.R.acosta
  #8 (permalink)  
Antiguo 11/01/2003, 03:13
 
Fecha de Ingreso: enero-2003
Mensajes: 71
Antigüedad: 21 años, 5 meses
Puntos: 0
Yo me he visto en este mismo problema, necesitaba tener dos forms en una misma página. El problema era que al darle al boton submit siempre me hacia el submit del primer formulario.

Lo solucione con javascript, en lugar de poner un <input type="submit"> puse un enlace del tipo:

Código:
<a href="#" onclick="document.form1.submit();">submit</a>
<a href="#" onclick="document.form2.submit();">submit</a>
Viene a ser algo asi, aunque antes de hacer el submit es mejor validar los datos.

En cualquier caso si puedes meterlo todo en un mismo form sera mucho mas sencillo.

Saludos.
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 18:26.