Help Needed Urgently

Results 1 to 2 of 2

Thread: Help Needed Urgently

  1. #1
    Join Date
    Dec 1969

    Default Help Needed Urgently

    I have 80 to 100 doc files and i am using one interface to giving links to doc files but my problem is i am using tables and using previous and next button for navigation what i want is when user clicks on any link the file will redirect the link.Foe e.g. I clicked on page 50 so when i clicked previous it will minus one value and take me to page 49 or when i clicked on next it will take me to page 51 depends on the value it will redirect the page.So if somebody knows anything about this please help me.<BR><BR>Thanks & Rgds<BR>Ashish

  2. #2
    Join Date
    Dec 1969

    Default RE: Help Needed Urgently

    put your doc files in a database (or at least there names) call them out in a loop.<BR>to show 10 at a time your going to need 4 variables.<BR><BR>1: shownum = 10<BR>2: pagenum = request.querystring("pagenum")<BR>3: totalcount = total records in your database (doc files)<BR>4: totalpages<BR><BR>totalpages = int(((totalcount / shownum) * -1)) * -1<BR><BR>&#039gets the totalpages from the total records devided by how<BR>&#039many records you want to show<BR><BR>if not products.eof then<BR> if pagenum = 1 then<BR> products.movefirst<BR> else<BR> for i = 1 to (((pagenum - 1) * shownum))<BR> do<BR> temp = products("_id")<BR> products.movenext<BR> b = b + 1<BR> loop until temp &#060;&#062; products("_id")<BR> next<BR> products.movefirst<BR> for i = 1 to b<BR> products.movenext<BR> next<BR>end if<BR>end if<BR>i = 1<BR> do until products.eof <BR><BR>if you can understand the logic behind this code <BR>your on your way.<BR><BR>also... 4guys has some tid bits on paging through recordsets.<BR>but for effeciency, you want to have your docs in a database<BR><BR>-matt<BR><BR><BR>

Posting Permissions

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