troso de codigo de ajax.js que provoca el error
// The XMLHttpRequest object
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();
}
pues bien a continuacion les presento el codigo completo de ajax.js
Código:
la versión de jquery es: jQuery JavaScript Library v1.3.2var seconds = 5; // el tiempo en que se refresca
var divid = "container"; // el div que quieres actualizar!
var url = "index.php"; // el archivo que ira en el div
////////////////////////////////
//
// Refreshing the DIV
//
////////////////////////////////
function refreshdiv(){
// The XMLHttpRequest object
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();
}
// Timestamp for preventing IE caching the GET request
var fetch_unix_timestamp ="";// lets declare the variable
fetch_unix_timestamp = function()
{
return parseInt(new Date().getTime().toString().substring(0, 10))
}
var timestamp = fetch_unix_timestamp();
var nocacheurl = url+"?t="+timestamp;
// The code...
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
document.getElementById(divid).innerHTML=xmlhttp.responseText;
setTimeout('refreshdiv()',seconds*1000);
}
}
xmlhttp.open("GET",nocacheurl,true);
xmlhttp.send(null);
}
// Empieza la función de refrescar
window.onload = function startrefresh(){
setTimeout('refreshdiv()',seconds*1000);
}
en el index los llamo así:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script src="actualiza.js" type="text/javascript"></script>
<script type="text/javascript" src="jquery.js"></script>
así comienza todo :)
amigos agradezco su ayuda y pido disculpas si es que me equivoco de foro y me queda mal diseñado es que es primera vez que realizo algo asi :)
pd: lo que necesito es que funcionen ambos js (jquery y ajax) sin que se bloquee alguno (quizas tengo las llamadas de forma erronea)


