Hi, I have a site that uses AJAX to fetch some results. At the moment, I'm only checking to see if readystate = 4, like this: function handleResults () { result = document.getElementById('result'); if (xml.readyState == 4) { if (xml.responseText == 'url.blank') { result.innerHTML = 'Enter a valid URL'; } else { result.innerHTML = xml.responseText; } } else { result.innerHTML = 'Loading... <img src="ajax_loader.gif" />'; } } Code (markup): I tried changing it to if (xml.readystate >= 3), however it still does the same thing and shows the two column table with the results once it's completely done. How would I go about making it show each result as it came in?
"readyState=3 => Some data has been received. responseText is not available. responseBody is not available." Therefore, you cannot use responseText. If you would like to show one row each then should make only one row returned at a time and request the next
I figured out how to do it. It requires you to use ob_start() and ob_flush() and a few other commands. You can find a small demo of it here: Domainjax which also has the source.