Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/05/2014, 15:55
felipeagudelo188
 
Fecha de Ingreso: enero-2011
Mensajes: 47
Antigüedad: 13 años, 3 meses
Puntos: 0
Actualizar datos con ajax

hola a todos estoy intentando actualizar datos usando ajax ,pero los datos no actualizan , muestra el registro anterior y no pasa mas de ahi ,he intentado no guardar cache con php y html y no funciona, por favor su ayuda

aqui el codigo que manejo en ajax

function nuevoAjax(){
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function mi_pagina(){

var contenedor = document.getElementById('vivo');

var variable=document.page.url.value;
ajax=nuevoAjax();
ajax.open("POST", "mi_pagina.php",true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4){
contenedor.innerHTML = ajax.responseText;
}

}
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

ajax.send("url="+variable)
}