SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can i do this with javascript?

    i have a directory with 50-60 .jpg images that change every week or so. i use 10 of those images in an album that changes weekly. the filenames are always changing.

    using javascript, is there anyway i can populate an array with the filenames and then randomly select ten of them to display in my album?

    i know i can do this if the filenames are the same and don't change, but is it possible to do it with ever-changing filenames? or would i have to resort to a database solution?

    tia...
    "There's no justice like angry mob justice!" --Seymour Skinner

  2. #2
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can manually edit a file list array every time your files change, else you'll have to go for a server side solution.


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
  •