paulupnorth
07-13-2012, 11:20 AM
Hi Guys and Gals,
Thanks for taking your time to have a look.
I am using this:
<script type="text/javascript">
function Ajax()
{
var
$http,
$self = arguments.callee;
if (window.XMLHttpRequest) {
$http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
$http = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
$http = new ActiveXObject('Microsoft.XMLHTTP');
}
}
if ($http) {
$http.onreadystatechange = function()
{
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('refreshthis').innerHTML = $http.responseText;
setTimeout(function(){$self();}, 5000);
}
};
$http.open('GET', 'test.asp' , true);
$http.send(null);
}
}
</script>
<script type="text/javascript">
setTimeout(function() {Ajax();}, 5000);
</script>
To refresh a div on my page called refreshthis, I would like to refresh multiple divs on the same page (refreshthis and refreshthis2) but my attempts have failed miserably.
Thanks for your time and any help in advance!
Thanks for taking your time to have a look.
I am using this:
<script type="text/javascript">
function Ajax()
{
var
$http,
$self = arguments.callee;
if (window.XMLHttpRequest) {
$http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
$http = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
$http = new ActiveXObject('Microsoft.XMLHTTP');
}
}
if ($http) {
$http.onreadystatechange = function()
{
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('refreshthis').innerHTML = $http.responseText;
setTimeout(function(){$self();}, 5000);
}
};
$http.open('GET', 'test.asp' , true);
$http.send(null);
}
}
</script>
<script type="text/javascript">
setTimeout(function() {Ajax();}, 5000);
</script>
To refresh a div on my page called refreshthis, I would like to refresh multiple divs on the same page (refreshthis and refreshthis2) but my attempts have failed miserably.
Thanks for your time and any help in advance!