Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Need some help with a thumbnail viewer.. Auto loading first image.
Old 06-09-2010, 10:23 AM Need some help with a thumbnail viewer.. Auto loading first image.
Experienced Talker

Posts: 32
Trades: 0
Ok so I am using “Image Thumbnail Viewer II” from Dynamic Drive http://www.dynamicdrive.com/dynamici...thumbnail2.htm

I would like to make it so when the page is loaded..There is an image already in the "Display Div" I don't want just a couple thumbnails and a big blank page...Its a bit confusing for someone if they think something else is supposed to load. Does anyone know how I can have a certain image autoload? see below for example of what I have. Thanks!!!

http://s278616331.onlinehome.us/other%20sites/jpf/
jpf566 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-09-2010, 07:41 PM Re: Need some help with a thumbnail viewer.. Auto loading first image.
kline11's Avatar
SearchBliss Web Tools

Posts: 1,788
Name: John
Location: USA
Trades: 0
I'm not sure exactly what you want. But I give it a go. You can preload images by adding this within the <body> tag:
Code:
onLoad="preloadImages('YourImage.gif')"
And add the folowing JaveScript:
Code:
<script language="javascript">
function preloadImages() {
var d=document; if(d.images){ if(!d.p) d.p=new Array();
var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
</script>
If you want to preload multiple images, use:
Code:
onLoad="preloadImages('YourImage.gif','YourImage2.gif','YourImage3.gif')"
I hope this helps!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by kline11; 06-09-2010 at 07:42 PM..
kline11 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need some help with a thumbnail viewer.. Auto loading first image.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11474 seconds with 12 queries