SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading random Images into Table Cells

    Dear Javascript Community,

    I would like to kindly ask for your help. I am trying to create a Java script that will preload random thumbnail images into an HTML Table 3x3 Cells. I have over 3500 Family photos, which have been numbered 0001.jpg – 3500.jpg and the corresponding thumbnails tn_0001.jgp – tn_3500.jpg. All images have been copied to the /images directory.

    The function I would like is that each cell displays a random thumbnail picture every time the page loads and is refreshed from the total pool of available pictures. Although unlikely I would also like to have a built in rule that makes sure no duplicates are in the other 8 cells. Once someone clicks on the thumbnail the full sized image will then open up in a new window.

    Is it possible to create a simple script without building a massive array with all indexed pictures?

    I would be really great full for any help in this regards

  2. #2
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can rewrite some javascript lottery generator like this http://www.machinehead-software.co.u...y/lottery.html or this http://javascript.internet.com/games...y-numbers.html


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •