I looked at SO on this topic, like this one here . Also this one . But for one, I don’t use the YouTube Flash object, nor do I use the image. The following is a simple AJAX request that retrieves data to populate a table.
$(document).ready(onDocumentReady);
function onDocumentReady(){
$('#Recorded').addClass('border').click(changeToRecorded);
$('#Pending').addClass('border').click(changeToPending);
$('#main').addClass('scroll');
$('#entries').addClass('main');
}
function changeToRecorded(){
$('#entries').hide();
$('#main').html("Loading");
$.get("getData.php",{ status: "R" },requestComplete);
}
function changeToPending(){
$('#entries').hide();
$('#main').html("Loading");
$.get("getData.php",{ status: "P" },requestComplete);
}
function requestComplete(data){
$('#main').html('<table id="entries"></table>');
$('#entries').addClass('main');
$('#entries').html(data);
$('#entries').show();
}
getData.php includes some built-in flash objects that populate the identifiers of the entries table. The problem is that it shows “Loading” during an AJAX request, however, after there is still a delay for loading inline objects into the table. Using jQuery or any other javascript method is a way to detect when all inline objects load?