html - error handling for AJAX div -


I am using a very useful AJAX-based script that has many Twitter timings in a div for a sports team -Line is said to load. The good thing about the script is that it (1) combines multiple timelines in a chronological timeline and (2) caches XML to fast loading every time, however, the Twitter feed goes down, Which means that (i) caching fails, (ii) the content will not load (I stick to the loading message), and (iii) if the problem is too large, the entire page (not just the div) is a 404 error Breaks and throws Land.

Therefore, I want to add error handling - specifically, pre-written message / div-content which will replace the message if the content does not load in a certain amount of time. I have found some good examples on this forum, how to handle timeouts, but with very easy work / script syntax, being a deal cut / paste / simulation programmer, let me optimize it Is having trouble.

The main HTML looks like this:

  & lt; Ul id = 'AjaxTwits' & gt; & Lt; Li id = 'AjaxTwitsLoader' & gt; & Lt; Em> Loading Tweets & lt; / Em> & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Script type = "text / javascript" & gt; GetAjaxTwits ("AjaxTwits / AjaxTwitsRequest.php", 6); & Lt; / Script & gt;  

Without digging into scripts and php files, is there any type of error / timeout handling that can be kept in this html? Appreciate any help!

Before I can not use this script,

There is a jquery plugin that you can find here:.

I do not think you have the same problem because it uses jquery to make AJAX calls. It is worth trying.

Hope it helps.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -