I am working to develop a facebook application and am running into a small snag. When making a ajax call I want to let the user know that the application is loading.
My confusion is that others say facebook does not allow animated gifs however the above application has an animated gif. I scoured through their source code to no avail. Any thoughts on how to get animated gifs to play in a facebook application would be great.
<script type="text/javascript">
function search_ajax()
{
document.getElementById('loading').setStyle('display', 'block');
var ajax = new Ajax();
ajax.responseType = Ajax.FBML;
ajax.ondone = function(data) {
document.getElementById('search_results').setInnerFBML(data);
document.getElementById('loading').setStyle('display', 'none');
}
var queryParams = { "VSearchMake" : document.getElementById('VSearchMake').getValue(),
"VSearchModel" : document.getElementById('VSearchModel').getValue(),
"VSearchYear" : document.getElementById('VSearchYear').getValue(),
"VSearchPrice" : document.getElementById('VSearchPrice').getValue(),
"ShowNewUsed" : document.getElementById('ShowNewUsed').getValue() };
ajax.post('http://domainname/facebook/results.cfm', queryParams);
}
</script>
<img src="http://domainname/images/loading.gif" id="loading" style="display:none;" />