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

Pasar datos de Option a Input

Estas en el tema de Pasar datos de Option a Input en el foro de ASP Clásico en Foros del Web. Hola Necesito me ayuden urgente Tengo una Intranet en ASP , para ingreso de CLIENTES, PRODUCTOS, ORDEN DE TRABAJO y FACTURAS. El problema esta en ...
  #1 (permalink)  
Antiguo 31/07/2003, 19:24
 
Fecha de Ingreso: julio-2003
Ubicación: Santiago
Mensajes: 11
Antigüedad: 20 años, 10 meses
Puntos: 0
Pregunta Pasar datos de Option a Input

Hola
Necesito me ayuden urgente
Tengo una Intranet en ASP , para ingreso de CLIENTES, PRODUCTOS, ORDEN DE TRABAJO y FACTURAS.
El problema esta en que no puedo hacer las FACTURAS, uso un OPTION para leer el NRO DE ORDEN DE TRABAJO, y quiero que los datos asociados me los deje en los input correspondientes.
Y no me resulta de ninguna forma
Podra alguien ayudarme con esto por favor ?????????

ACA VA EL CODIGO

<html>
<head>
<title>Intranet O.T.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#FFFFFF">
<p><img src="banner.jpg" width="794" height="123"></p>
<form action="procesar3.asp" method="post">
<p><font color="#000000">Fecha Actual </font><font color="#0033FF"><%=Date%>
</font></p>
<%
Dim oConn,strSQL, objRS
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Servicios.mdb"))
strSQL = "SELECT * FROM Orden_Trabajo"
Set objRS = oConn.Execute(strSQL)
%>
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="87%" id="AutoNumber1" height="269">
<tr bgcolor="#CCCCCC">
<td width="100%" colspan="4" height="21"> <p align="center"><b><font color="#000000" face="Tahoma">Emisión&nbsp;Factura</font></b></p></td>
</tr>
<tr>
<td width="24%" height="21">&nbsp;</td>
<td width="38%" height="21">&nbsp;</td>
<td width="18%" height="21">&nbsp;</td>
<td width="34%" height="21">&nbsp;</td>
</tr>
<tr>
<td width="24%" height="25"><font color="#000000" face="Tahoma">Número de Factura</font></td>
<td width="56%" colspan="2" height="25"><font face="Tahoma">
<input name="Id" size="10" >
</font></td>
<td width="34%" height="25">&nbsp;</td>
</tr>
<tr>
<td width="24%" height="40"><font face="Tahoma">Nro Orden de Trabajo</font></td>
<td width="38%" height="40"><select name="Nro_Orden" =value="<%=Nro_Orden%>">
<option>Seleccione...</option>
<%
Do While not objRS.eof%>
<option><%=objRS("Nro_Orden")%></option>
<input type="text" size="20" value="<%=objRS.fields("Cod_Producto1")%>"

<% objRS.movenext
Loop
%>
</select>

<%
If request.form() <> "" then
Empresa = objRS.fields("Empresa")

End if
%>

</td>
<td width="18%" height="40"></td>
<td width="34%" height="40"></td>
</tr>
<tr>
<td width="24%" height="25"><font color="#000000" face="Tahoma">Cliente</font></td>
<td width="38%" height="25"><font face="Tahoma"> <input name="Cliente" value="<%=Empresa%>">

</font></td>
<td width="18%" height="25">&nbsp;</td>
<td width="34%" height="25">&nbsp;</td>
</tr>
<tr>
<td width="24%" height="25"><font color="#000000" face="Tahoma">Producto 1</font></td>
<td width="38%" height="25"><input type="text" name="Codigo_Producto1" size="42"></td>
<td width="18%" align="left" height="25"><font face="Tahoma">Valor 1</font></td>
<td width="34%" height="25">
<p align="left"><input type="text" name="T5" size="12"></p>
</td>
</tr>
<tr>
<td width="24%" height="25"> <font color="#000000" face="Tahoma">Producto 2</font></td>
<td width="38%" height="25"> <input type="text" name="T4" size="42"></td>
<td width="18%" align="left" height="25"> <font face="Tahoma">Valor 2</font></td>
<td width="34%" height="25">
<p align="left"><input type="text" name="T6" size="12"></td>
</tr>
<tr>
<td width="24%" height="24"> <font face="Tahoma">Producto 3</font></td>
<td width="38%" height="24"> <input type="text" name="T2" size="42"></td>
<td width="18%" align="left" height="24"> <font face="Tahoma">Valor 3</font></td>
<td width="34%" height="24">
<p align="left"><input type="text" name="T7" size="12"></td>
</tr>
<tr>
<td width="24%" height="21"> </td>
<td width="38%" height="21"> </td>
<td width="18%" height="21">
<p align="left"><font face="Tahoma">Valor Prestación</font></td>
<td width="34%" height="21">
<p align="left"><input type="text" name="T8" size="12"></td>
</tr>
<tr>
<td width="24%" height="21"> </td>
<td width="38%" height="21"> </td>
<td width="18%" height="21" align="left"> <font face="Tahoma">Neto</font></td>
<td width="34%" height="21">
<p align="left"><input type="text" name="T9" size="12"></td>
</tr>
<tr>
<td width="24%" height="21"> </td>
<td width="38%" height="21"> </td>
<td width="18%" height="21" align="left"> <font face="Tahoma">Iva</font></td>
<td width="34%" height="21">
<p align="left"><input type="text" name="T10" size="12"></td>
</tr>
<tr>
<td width="24%" height="21"> <p align="center"><font face="Tahoma">&nbsp;</font></p></td>
<td width="38%" height="21"> <p align="center"><font face="Tahoma">&nbsp;</font></p></td>
<td width="18%" height="21"> <p align="left"><font face="Tahoma">Total</font></p></td>
<td width="34%" height="21">
<p align="left"><input type="text" name="T11" size="12"></td>
</tr>

</table>
<p align="center"><font face="Tahoma"><input type="submit" value="Guardar" name="B1">&nbsp;&nbsp;&nbsp; <input type="reset" value="Borrar" name="B2"></font></p>
</form>
<p align=center><A href="menu.htm">Volver a Menú Principal</a></p>
</body>
</html>
  #2 (permalink)  
Antiguo 01/08/2003, 02:12
Avatar de AlexNV  
Fecha de Ingreso: junio-2003
Ubicación: Madrid
Mensajes: 289
Antigüedad: 21 años
Puntos: 1
Tienes dos opciones.
1. Meter en un array todos los datos de la tabla, y luego en el evento asociado al select recuperar el resto de datos del array.
Esto es viable siempre que la tabla no tenga muchos registros.

2. Hacerlo en dos pasos. En uno elegir la orden, enviarlo a otro formulario donde se haga un nuevo select para recuperar el resto de campos de esa orden.

Un saludo.
  #3 (permalink)  
Antiguo 03/08/2003, 15:40
 
Fecha de Ingreso: julio-2003
Ubicación: Santiago
Mensajes: 11
Antigüedad: 20 años, 10 meses
Puntos: 0
Y como hago el arreglo ?
la verdad es q puse la pregunta porque llevo poco con ASP y no se como solucionar esto.
Gracias
  #4 (permalink)  
Antiguo 03/08/2003, 15:41
 
Fecha de Ingreso: julio-2003
Ubicación: Santiago
Mensajes: 11
Antigüedad: 20 años, 10 meses
Puntos: 0
Pregunta Arrlego

Hola
Necesito saber como hago un arreglo para mostrar los datos de una BD mediante un SELECT.
  #5 (permalink)  
Antiguo 04/08/2003, 01:11
Avatar de AlexNV  
Fecha de Ingreso: junio-2003
Ubicación: Madrid
Mensajes: 289
Antigüedad: 21 años
Puntos: 1
acabo de responder una pregunta parecida.
Mira aqui.

http://www.forosdelweb.com/s/msg145632.html

un saludo.
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 01:34.