...

View Full Version : Javascript Preload PDF File



chbrandt
06-19-2009, 09:55 AM
I have embedded a pdf file into a website, and I'd like to show the user some sort of preload image while it's loading:

the pdf:

http://mikeandzachsbbq.com/Menu/

preload image I'd like to use:

http://audiadesign.com/preload.gif


When I made the preloader on audiadesign.com, it was for images, and here was the code I used:


if (document.images)
{
image1= new Image(783,198);
image1.src="http://www.audiadesign.com/images/1/1_02.jpg";

image2= new Image(783,198);
image2.src="http://www.audiadesign.com/images/2/2_02.jpg";

image3= new Image(783,198);
image3.src="http://www.audiadesign.com/images/3/3_02.jpg";
}


and so on....

Would it be possible to make a .js file that would preload the PDF file so that I could make the .gif image show up over that div onload until the .js loaded the PDF?

Thanks in advance
Chris



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum