View Single Post
ישן 03-08-10, 22:14   # 1
Skfir
חסום
 
מיני פרופיל
תאריך הצטרפות: May 2009
מיקום: הוד השרון
גיל: 33
הודעות: 552
שלח הודעה באמצעות ICO אל Skfir שלח הודעה באמצעות MSN אל Skfir

Skfir לא מחובר  

עזרה עם xml ו setInterval

קוד:
<html>
<head>
<script type="text/javascript" src="js.js"></script>
</head>
<body>
<script type="text/javascript">
xmlDoc=loadXMLDoc("books.xml");

document.write(xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue + "<br />");
document.write(xmlDoc.getElementsByTagName("author")[0].childNodes[0].nodeValue + "<br />");
document.write(xmlDoc.getElementsByTagName("year")[0].childNodes[0].nodeValue);
</script>
</body>
</html>
קוד:
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET",dname,false);
xhttp.send();
return xhttp.responseXML;
}
איך אני מוסיף לזה רענון אוטומטי שזה יציג תוכן עדכני מה xml שלי
אני ידוע שמשתמשים ב setInterval או setTimeout אבל זה לא מצליח לי...
  Reply With Quote