Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Funciona en local, pero no cuando lo subo.

Estas en el tema de Funciona en local, pero no cuando lo subo. en el foro de Frameworks JS en Foros del Web. Buenos dias, tengo 2 archivos que funcionan en local pero cuando lo subo al servidor no funciona, no actualiza el valor del segundo input text. ...
  #1 (permalink)  
Antiguo 11/01/2006, 06:00
 
Fecha de Ingreso: mayo-2003
Mensajes: 70
Antigüedad: 20 años, 11 meses
Puntos: 0
Funciona en local, pero no cuando lo subo.

Buenos dias,

tengo 2 archivos que funcionan en local pero cuando lo subo al servidor no funciona, no actualiza el valor del segundo input text.
cuando ingreso un valor en el primer campo de texto segun sea este, debe variar el valor del segundo.
si alguien puede mirar si me falta algo se lo agradeceria.
este es el codigo de la primera pagina (Formulario.asp)
Código:
<html>
<head>
<script language="javascript" type="text/javascript">
function handleHttpResponse() { 
    if (http.readyState == 4) { 
       if (http.status == 200) { 
          if (http.responseText.indexOf('invalid') == -1) {
             // Armamos un array, usando la coma para separar elementos
             results = http.responseText; 
             document.getElementById("txtEspesor").value = results;
             enProceso = false;
          }
       }
    }
}

function Calcularvalor() {
    if (!enProceso && http) {
       var valor = escape(document.getElementById("txtCalibre").value);
       var url = "consulta.asp?txtCalibre="+ valor;
       http.open("GET", url, true);
       http.onreadystatechange = handleHttpResponse;
       enProceso = true;
       http.send(null);
    }
}

function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
       try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) { xmlhttp = false; }
       }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
       try {
          xmlhttp = new XMLHttpRequest();
       } catch (e) { xmlhttp = false; }
    }
    return xmlhttp;
}

var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest

</script>
</head>

<body>
<form method="post">
  <table width="300"  border="0" cellpadding="4" cellspacing="0">
     <tr> <td>Diametro de la tuberia: <input name="txtCalibre" type="text" class="inputstyle" id="txtCalibre" size="15" onBlur="Calcularvalor();"></td> </tr>
     <tr> <td>Espesor de aislamiento: <input name="txtEspesor" type="text" class="inputstyle" id="txtEspesor" value="40" size="15"> mm</td> </tr>
  </table>
</form>
</body>
</html>
y este es el de la consulta (consulta.asp)
Código:
<%
if request.querystring("txtCalibre") <> "" then
    
	Set dbcSuperConexion = Server.CreateObject("ADODB.Connection")

	dbcSuperConexion.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("../../data/isover.mdb")

	strSQL = "SELECT TOP 1 * FROM aislamientos where id IN (Select id from aislamientos2 where tipo='tuberias' AND (dmin < " &  request.querystring("txtCalibre")  & " AND dmax >= " &  request.querystring("txtCalibre")  & ")) order by recomendacion_tuberias"

	set rs=Server.CreateObject("ADODB.Recordset")
	Set rs = dbcSuperConexion.Execute(strSQL)
	
	response.write rs.Fields("espesor_minimo")	
	
	rs.Close
	set rs=nothing
	
end if
%>
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 21:25.