469,290 Members | 1,930 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

separate list in pages x

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

--
HyperART
Paul Van Ostaijenlaan 4
3001 Heverlee

Jul 19 '05 #1
2 1628
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

-----Original Message-----
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 inpages.
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 istands for the i-th file on the list
any good links out there?

tia

bartp

--
HyperART
Paul Van Ostaijenlaan 4
3001 Heverlee

.

Jul 19 '05 #2
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
==========================================

"chris lynn" <ch********@manageware.net> wrote in message
news:03****************************@phx.gbl...
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

-----Original Message-----
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

--
HyperART
Paul Van Ostaijenlaan 4
3001 Heverlee

.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Shwetabh | last post: by
reply views Thread by Richard | last post: by
2 posts views Thread by Shahid Siddiqui | last post: by
5 posts views Thread by Tom Leylan | last post: by
2 posts views Thread by Jack Li | last post: by
3 posts views Thread by LurfysMa | last post: by
3 posts views Thread by Blasting Cap | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.