Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/04/2003, 23:28
pablo_net
 
Fecha de Ingreso: marzo-2003
Mensajes: 22
Antigüedad: 22 años, 1 mes
Puntos: 0
pasar valores entre 2 formularios en una pagina

Hola
Tengo una pag ASP con 3 textbox y esos valores los quiero mandar a una tabla que cresca dinamicamente tantas veces como yo quiera enviar estos 3 valores.
les adjunto el codigo, y ademas debe sumar los valores ingresados
espero se entienda

GRACIAS

<%@ LANGUAGE=VBScript %>
<html>
<body>
<script language="JavaScript">
function sis()
{
valorcod=document.formulario1.nombre.value
location.href="prueba1.asp?codigotrago="+valorcod
}
</script>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "prueba"
sSQL="Select nombre,codigo_trago From tragos order by codigo_trago,nombre"
set RS = Conn.Execute(sSQL)
%>
<form name="formulario1" method="post" action="prueba1.asp">
<table width="90%" border="0" height="47">
<tr>
<td width="18%">SELECCIONE EL TRAGO</td>
<td width="22%">NOMBRE </td>
<td width="23%">PRE$IO</td>
<td width="24%">CANTIDAD</td>
<td width="13%">&nbsp;</td>
</tr>
<tr>
<td width="18%">
<select name="nombre" onChange="sis();">
<option selected>SELECCIONE TRAGO</option>
<%
While Not rs.EOF
%>
<option value=<%=RS("codigo_trago")%>><%=RS("nombre")%></option>
<%
RS.movenext
Wend
%>
</select>
</td>
<%
url=Request.Querystring("codigotrago")
if url <> "" then
sSQL="Select nombre,valor_neto From tragos where codigo_trago=" & url & " order by valor_neto"
set RS = Conn.Execute(sSQL)
%>
<td width="22%">
<input name="textnombre" type="text" value="<%=RS("nombre")%>">

</td>

<td width="23%">
<input name="textprecio" type="text" value="<%=RS("valor_neto")%>">
</td>
<td width="24%">
<input name="textcantidad" type="text" value="">
</td>

<% else %>
<td width="22%">
<input name="textnombre" type="text" value="">

</td>

<td width="23%">
<input name="textprecio" type="text" value="">
</td>
<td width="24%">
<input name="textcantidad" type="text" value="">
</td>
<% END IF %>
<td width="13%">
<input type="submit" name="Submit2" value="Enviar">
</td>
</tr>
</table>
</form>
<form>
<p>&nbsp;</p><table width="25%" border="1" align="center">
<tr>
<td>CANTIDAD</td>
<td>NOMBRE</td>
<td>VALOR</td>
</tr>
'aqui tiene que ir la tabla dinamica

<tr>
<td>&nbsp;</td>
<td>TOTAL</td>
<td>&nbsp;</td>
</tr>
</table>
<p align="center">&nbsp;</p>
<div align="center">
<input type="submit" name="Submit" value="Generar boleta">
</div>
</form>
</body>
</html>
__________________
Entre mas conosco la informatica me doy cuenta q no tiene limites