PDA

View Full Version : Help: Auto-refresh Ajax Tabs



jerrytouille
07-08-2010, 03:43 PM
1) Script Title: Ajax Tabs Content Script (v 2.2)

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem:
- I got the Ajax Tabs works perfectly. Is there a way to auto-refresh/auto-update a DD ajax tab in a time interval?
I currently has another ajax script to do this but it doesn't work with DD Ajax Tab script.
Without DD script it ajax-auto-update the page content fine.

- Here is my auto-update ajax script:
<script type="text/javascript">
self.setInterval("Ajax()", 3000);
function Ajax() {
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("daily_data").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "daily.htm", true);
xmlhttp.send();
}
</script>

</head>

<body onload="Ajax()">

4) Thanks for your help!

:)

ddadmin
07-09-2010, 10:14 PM
Have you read the following thread: http://www.dynamicdrive.com/forums/showthread.php?t=16693

jerrytouille
07-14-2010, 07:59 PM
Thank you. I should have looked more closely when I did a search on the forum.