Hello everybody,
I wrote a file using AJAX this is the code I wrote:
File.js
var http = createRequestObject();
function createRequestObject(){
var request_;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
request_ = new ActiveXObject("Microsoft.XMLHTTP");
}
else{
request_ = new XMLHttpRequest();
}
return request_;
}
function getInfo(){
http.open('get', 'GtCht.php');
http.onreadystatechange = handleInfo;
http.send(null);
}
function handleInfo(){
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('ChtPlc').innerHTML= [B]document.getElementById('ChtPlc').innerHTML + response;[/B]
}
}
I binded that file with a function in JavaScript:
<script language="javascript">
function GetINF(){
window.setTimeout(getInfo(),1000)
}
</script>
So when this file selects an animated image from the MySQL database it refreshes the image automaticially each 1 second, however I want this image to stay moving until its final frame.
Could you help please? :-/