paged file picture listing

Results 1 to 2 of 2

Thread: paged file picture listing

  1. #1
    Join Date
    Dec 1969

    Default paged file picture listing

    so i got this script i wrote that takes every file/picture in a specified direcotry and displays them. I have included the code below. What i need is it to display like 5 of the pictures then, put like a goto page link at the bottom. Then when ya click it goes to page 2 and displays 5 different images. It keeps doing this for all of them.<BR><BR>** The current source code **<BR><BR>&#060;%<BR>Const imgdir = "**specified directory**"<BR><BR>Dim objFSO, objFolderObject, objFileCollection, objFile<BR>Dim intFileNumberToUse, intFileLooper<BR>Dim objImageFileToUse<BR>Dim strImageSrcText<BR><BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Set objFolderObject = objFSO.GetFolder(Server.MapPath(imgdir))<BR>Set objFSO = Nothing<BR><BR>Set objFileCollection = objFolderObject.Files<BR>Set objFolderObject = Nothing<BR><BR>For Each objFile in objFileCollection<BR> Set objImageFileToUse = objFile<BR> strImageSrcText = imgdir & objImageFileToUse.Name<BR> %&#062;<BR> <BR> &#060;div align="center"&#062;<BR> &#060;a target="_blank" href="&#060;%=strImageSrcText%&#062;"&#062;&#060;i mg width="266" height="205" <BR> src="&#060;%=strImageSrcText%&#062;" border="0" style="filter:alpha(opacity=30)" <BR> onMouseOver="highlight(this,0)" onMouseOut="highlight(this,1)" alt="« doom III"&#062;&#060;/a&#062;<BR> &#060;/div&#062;<BR> <BR><BR><BR> &#060;%<BR>Next<BR><BR>Set objFileCollection = Nothing<BR>Set objImageFileToUse = Nothing<BR>%&#062;<BR><BR>Thanks In Advance,<BR><BR>David Hill

  2. #2
    Join Date
    Dec 1969

    Default RE: paged file picture listing

    I think you should read all the files into an array and use &#039;paging&#039; to browse through the picture.<BR><BR>There are some tutorials on paging database results on I think you can adapt them to fit your needs.

Posting Permissions

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