Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/03/2011, 09:20
principiante2011
 
Fecha de Ingreso: marzo-2011
Mensajes: 14
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: Actualizar web con ajax

hola te agradezco tu ayuda pero ese tutorial ya lo habia visto ,pero sigue sin salirme he vista varios tutoriales y los he subido a mi web pero algo me sale mal y ya estoy echo un lio le pongo interes , buscando encontre un jquery http://jquery.com/ .ejemplo en el index pongo esto.

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="ajax.js"></script>

despues subo un archivo llamado jquery.js es decir este http://jquery.com/

despues un archivo llamado ajax.js y pongo esto



function objetoAjax(){
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 Post(post,elemento){
cont = document.getElementById(elemento);
ajax=objetoAjax();
ajax.open("GET", post);
ajax.onreadystatechange = function(){
if (ajax.readyState == 4 && ajax.status == 200) {
cont.innerHTML = ajax.responseText;
}
}
ajax.send(null);
}

function () {Post('/','');}
function destacados() {Post('destacado','destacado');}

function load() { Post('destacado','destacado'); setTimeout('()',2000); setInterval('destacados()',120000);}


if ( top != self ) top.location.href = 'URL DE MI WEB';


PUES ASI ES COMO ESTOY HACIENDO PERO NO SE SI ES CORRECTO .HABER SI ME PUEDES GUIAR TE LO AGRADECERIA MUCHO