Hello. I've been using a very helpful AJAX-based script called AJAXTwits to load multiple Twitter timelines for a sports team into a div. The nice thing about the script is that it (1) combines multiple timelines into one chronological timeline and (2) caches the xml for faster loading. Every so often, though, Twitter's feeds go down, meaning that (i) the caching fails, (ii) the content won't load (I get stuck with the loading message), and (iii) if the problem is big enough, the whole page (not just div) breaks and throws a 404 error.
So, I'd like to add error-handling -- specifically, a pre-written message/div-content that will replace the loading message if the content doesn't load within a set amount of time. I've found some nice examples on this forum on how to handle timeouts. But those deal with a much simpler function/script syntax that does not call out to other js/php files. Being a cut/paste/emulate programmer, I'm having trouble adapting that.
The main html looks like this:
<ul id='AjaxTwits'>
<li id='AjaxTwitsLoader'>
<em>Loading tweets</em>
</li>
</ul>
<script type="text/javascript">
getAjaxTwits("AjaxTwits/AjaxTwitsRequest.php", 6);
</script>
Without digging into the script and php files, is there any kind of error/timeout handling that can be placed into this html? Any help appreciated!