Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/02/2008, 13:06
posman
 
Fecha de Ingreso: enero-2008
Mensajes: 614
Antigüedad: 17 años
Puntos: 57
Re: Ejecutar pagina asp sin abrirla

Aqui te dejo un ejemplo

pagina.html
Código HTML:
<html>
<head>
<script>
function llamarASP() {
	if (window.XMLHttpRequest) { 
		xhr = new XMLHttpRequest();     // Firefox, Safari, ...
	} 
	else 
		if (window.ActiveXObject) {
			xhr = new ActiveXObject("Microsoft.XMLHTTP");  // Internet Explorer 
		}

	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4) alert(xhr.responseText);
	}
	xhr.open('GET', 'ajax.asp', true);                  
	xhr.send(null);
}
</script>
</head>

<body>
<input type="button" value="AJAX" onclick="llamarASP()">
</body>
</html> 
ajax.asp
Código:
<%
response.write "Esto es AJAX"
%>