I\'m embedding a PDF in a web page with the following html :-
You are going to want something like jQuery's document.ready()
function. For non-IE browsers, you can register a handler for the event DOMContentLoaded
, and your handler function will be called after all the images and objects have been loaded. For IE, you have to continually check the document.readyState
property, and wait for it to be "complete"
.
If you are using jQuery, they've done the hard work for you, so all you have to do is:
$(document).ready(function() {
//take away the "loading" message here
});
If you don't want to use jquery, you'd have to do something like:
addEventListener('DOMContentLoaded', function() {
//take away the "loading" message here
});
function waitForIE() {
if (!document.all) return;
if (document.readyState == "complete") {
//take away the "loading" message here
}
else {
setTimeout(waitForIE, 10);
}
}
waitForIE();