Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Animated Gif Stops while records retreived

Status
Not open for further replies.

hovercraft

Technical User
Jun 19, 2006
236
US
I have an issue similar to this thread thread1600-1347079 I have an animated gif that plays while a list of records is being built via php and mysql. My problem is that the animation stops while the processing going on. The gif does loop over and over if no request is made. Sometimes the recordset takes 40-50 seconds to return any records so it appears as if the pc is locked-up.

this is my javascript code which fires off onload when the initial php page loads.
Code:
function getdeflist()
{

xmlhttp_deflist.open("POST","build_deflist.php","true");

xmlhttp_deflist.setRequestHeader("Content-Type","application/x-[URL unfurl="true"]www-form-urlencoded;[/URL] charset=UTF-8");
xmlhttp_deflist.onreadystatechange = function() 
{  
if (xmlhttp_deflist.readyState != 4 && xmlhttp_deflist.status != 200) 
	{        var response_deflist = xmlhttp_deflist.responseText;
		document.getElementById('deflist').innerHTML = 'One Moment Please....<img src="../imgs/search.gif"></img>';
	}
  if (xmlhttp_deflist.readyState == 4 && xmlhttp_deflist.status == 200) 
	{        var response_deflist = xmlhttp_deflist.responseText;
		document.getElementById('deflist').innerHTML = response_deflist;
	}
	
}

xmlhttp_deflist.send(null);

}
Does anyone know why this would be happening?

Thanks for any information
Hovercraft
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top