separate list in pages x

  • Thread starter Bart Plessers \(artabel\)
  • Start date
B

Bart Plessers \(artabel\)

Hello,

I am developping a web-based file browser.
Everything so far so good right now.

To make the userinterface more conveniant, I want to split my file list in
pages.
with
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(CurrentPATH)
Set oFolderContents = oFolder.Files
For Each oFileItem in oFolder.Files
(...)
Next


I get a list of all my files in oFolderContents.
Is there a easy way to

-split the whole list up in pages of i.e. 20 files
-show general info (i.e. xxx files in folder, listing 20 files on page y/z)
-let the user have the possibility to call the page with index i, where i
stands for the i-th file on the list


any good links out there?

tia

bartp
 
C

chris lynn

I ran into the same problem with recordset displaying only
x amount of records. I was surprised to see so little on
this, and so many times I've seen it in websites. a few of
the responses suggested putting the data into temp table
and then using that to your advantage. I created some code
that used the recordset.move method (i.e. rs5.Move(page))
to accomplish this. I'm not sure how to do this cleanly
with files. The temp table suggestion might be the only
way. Our maybe an array and pass it to the same asp page.

I can show you want I did for recordset data. It's simple
and works. I use SQL Server 2K. Just e-mail me.

Christopher
 
B

bart plessers

I was also suprised on the lack of response on this issue.
Anyway,
the way I am doing it right now is building a 2dim array a_files(i,j) where
i stands for the file attributes (name, path, date, size, ...) and j is the
number of the file in the array

then -depending on page size, i.e. each page contains 5x3 files = 15 files -
I calculate the page number of the file.
browsing with next and previous page can be done


thanx for response

bart

ps
Please send me your code. Probably I can learn of your design.

--

==========================================
Hyper A.R.T.
bart plessers
Paul Van Ostaijenlaan 4
3001 Heverlee
BELGIUM
tel: +32 (16) 23.40.85
fax: +32 (16) 23.41.06
==========================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top