
24/02/2005, 16:11
|
 | | | Fecha de Ingreso: diciembre-2002 Ubicación: santiago-chilito
Mensajes: 1.931
Antigüedad: 22 años, 4 meses Puntos: 2 | |
te refieres al correr bajo el mimo dominio que se refieran todas al mismo servidor.
en resumen :
lo que creo en asp en una aplicacion para un pocket nunca se vera en internet ya que solo sera accesible para la red interna de una empresa por eso uso 192......
bueno siguiendo los valores de las variables de session me encontre que se pierden antes de lo que pensaba , lo extraño es que se pierden al apretar un boton de formulario que salta a otra pag. (lo cual me parece demaciado extraño).
pongo el codigo para ver si alguien encuentra algo extraño .
hasta esta pag. llegan la variables de la sessiin user y clave pero al presionar el boton del formulario cuando aparesca la pag a la que llama esta no contendra ya las variables
<!-- #include file="verifica_datos.asp" --> //verifica que la varibles session no sean vacias si lo son direcciona la pag.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE>
.textarea
{
font-family: Verdana;
color: #0099cc;
font-size: 8pt;
border-top: 1pt solid #000000;
border-left: 1pt solid #000000;
border-bottom: 1pt solid #000000;
border-right: 1pt solid #000000;
font-weight: bold;
background: #ffffff;
height:15px;
}
.textarea1
{
font-family: Verdana;
color: #0099cc;
font-size: 12pt;
border-top: 1pt solid #000000;
border-left: 1pt solid #000000;
border-bottom: 1pt solid #000000;
border-right: 1pt solid #000000;
font-weight: bold;
background: #ffffff;
height:25px;
}
.boton{
font-size:10px;
width:60px;
height:17px;
}
.boton1{
font-size:10px;
width:100px;
height:20px;
}
.boton2{
font-size:10px;
width:95px;
height:25px;
}
.grande{
font-size:10px;
width:105px;
height:17px;
}
</STYLE>
<script language="JavaScript" type="text/JavaScript">
function foco(){
document.form1.producto.focus();
document.execCommand("ClearAuthenticationCache");
}
</script>
</head>
<body onload="foco()">
<%
response.write("<br><br><br><br><br><br><br><br><b r><br><br><br><br><br><br><br><br><br><br><br>user :" & Session("usuario")) // las uso para ver si estan as variables ,aqui si aparecen
response.write("clave" & Session("clave"))
//BUSCAMOS LA EXISTENCIA DE LA NOTA
on error resume next
if Session("nota")<>"" then
nota=Trim(Session("nota"))
else
nota=Request.Form("select")
end if
%> <!-- #include file="conecta.asp" --> <%
sql="select NVNUMERO from softland.nw_NVENTA where nvnumero='" & nota & "' "
Set objRS = oConn.Execute(sQL)
IF objRS.EOF THEN
%>
<font size="2">NO EXISTE NOTA<BR></font>
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1"><img src="/images/error.gif" width="194" height="113"></div>
<META HTTP-EQUIV="Refresh" CONTENT="2;URL=http://192.168.0.1/control_producto/ingreso_nota.asp">
<bgsound src="/mp3/beep.wav" balance=0 volume=0></bgsound>
<bgsound src="/mp3/beep.wav" balance=0 volume=0></bgsound>
<bgsound src="/mp3/beep.wav" balance=0 volume=0></bgsound>
<%
response.end()
else
// calcular la cantidad de pinchado
%> <!-- #include file="conecta.asp" --> <%
// sql="SELECT NVNUMERO, NVCANT, SUM (NVCANT-NVCANTDESP) as resta FROM SOFTLAND.NW_DETNV WHERE NVNUMERO='" & nota & "' "
a1="SELECT NVNUMERO,CODPROD,NVCANT,NVCANTDESP , "
a2=" SUM (NVCANT-NVCANTDESP) as suma "
a3=" FROM SOFTLAND.NW_DETNV WHERE NVNUMERO='" & nota & "' "
a4=" GROUP BY NVNUMERO,CODPROD,NVCANT,NVCANTDESP "
sql=a1 & a2 & a3 & a4
Set RS = oConn.Execute(sQL)
RS.MOVEFIRST
WHILE NOT RS.EOF
SUMA=RS("suma")+SUMA
RS.MOVENEXT
WEND
set RS = nothing
STOCK=SUMA
//CALCULA LO PINCHADO POR EL POCKET
%> <!-- #include file="conecta.asp" --> <%
sql="select CANTIDAD from softland.ext_pocket_nota WHERE NOTA_VENTA='" & nota & "' "
Set RS = oConn.Execute(sQL)
RS.MOVEFIRST
WHILE NOT RS.EOF
PINCHADO=RS("CANTIDAD")+PINCHADO
RS.MOVENEXT
WEND
// RESPONSE.WRITE (PINCHADO)
TOTAL=SUMA-PINCHADO
end if
%>
<div id="Layer1" style="position:absolute; width:224px; height:96px; z-index:2; left: 2px; top: 2px;">
<form name="form1" method="post" action="prueba.asp">
<table width="100%" border="1">
<tr>
<td width="43%"><font size="-6">NOTA SELECCIONADA:</font></td>
<td width="57%">
<input name="nota" type="text" size="10" maxlength="10" value="<% Trim(response.write(nota)) %>" class="textarea" ></td>
</tr>
<tr>
<td><font size="-7">CANTIDAD A PINCHAR:</font></td>
<td><input name="cantidad" type="text" size="5" maxlength="5" value="1" class="textarea" ></td>
</tr>
<tr>
<td height="25"><font size="-7">PRODUCTO:</font></td>
<td><input name="producto" type="text" size="20" maxlength="20" class="textarea" ></td>
</tr>
<tr>
<td height="33"><font size="-6">PENDIENTE POR DESPACHAR:</font></td>
<td> <div align="left">
<input name="textfield" type="text" size="15" maxlength="15" class="textarea" VALUE="<% RESPONSE.WRITE (TOTAL) %>" >
</div></td>
</tr>
<tr>
<td height="25"> </td>
<td><div align="CENTER">
<input type="submit" name="Submit" value="ACEPTAR" class="boton"></td>
</tr>
</table>
<div align="center"> </div>
</form>
</div>
<div id="Layer3" style="position:absolute; width:116+px; height:41px; z-index:6; left:10px; top: 170px;">
<form name="form3" method="post" action="muestra_lecturas.asp">
<input type="submit" name="Submit3" value="ANULAR PINCHAZO" class="boton1">
</form>
</div>
<div id="Layer2" style="position:absolute; width:116px; height:38px; z-index:3; left: 115px; top: 170px;">
<form name="form2" method="post" action="ingreso_nota.asp">
<input type="submit" name="Submit2" value="CAMBIAR NOTA" class="boton1">
</form>
</div>
<div id="Layer2" style="position:absolute; width:116px; height:38px; z-index:3; left: 4px; top: 126px;">
<form name="form2" method="post" action="nota.asp">
<input type="hidden" name="select" class="textarea" value="<% response.write(nota) %> " >
<input type="submit" name="Submit2" value="MOSTRAR DETALLE" class="boton2">
</form>
</div>
<%
response.write("<br><br><br><br><br><br><br><br><b r><br><br><br><br><br><br><br><br><br><br><br>user :" & Session("usuario")) // las uso para ver si estan as variables ,aqui si aparecen
response.write("clave" & Session("clave"))
%>
</body>
</html>
Última edición por mveraa; 24/02/2005 a las 16:13 |