Permalink: http://www.treeweb.es/u/833/
13/11/2010
Código para AJAX
/* SOPORTE PARA FUNCIONALIDAD AJAX */
function getAjax(url) {
var xmlHttp = null
try {
xmlHttp = new XMLHttpRequest() // Firefox, Opera 8.0+, Safari
} catch (e) {
// Internet Explorer
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
} catch (e) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")
}
}
xmlHttp.open ('POST', url, true);
xmlHttp.setRequestHeader('Connection', 'close');
xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
return xmlHttp;
}