Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Navigation

New Here ,
Aug 28, 2008 Aug 28, 2008
I try to create the navigation and I alomost got there. There is one problem that when i click the
"next" go to page2, I got the repeated record from the last record was show on page1. Then I click "next" go to page3 then it worked fine, no repeating record. Why it is only happend on page 2 and what should i do?


<cfparam name="PageNum_RecordReturn" default="1">
<cfset maxrows_recordreturn=2>
<cfparam name="PageNum_RecordReturn" default="1">
<cfset startrow_recordreturn=min((pagenum_recordreturn-1)*maxrows_recordreturn+1,max(counter,1))>
<cfset endrow_recordreturn=min(startrow_recordreturn+maxrows_recordreturn-1, counter)>
<cfset totalpages_recordreturn=ceiling(counter/maxrows_recordreturn)>
<cfset querystring_recordreturn=iif(cgi.query_string neq "",de("&"&cgi.query_string),de(""))>
<cfset temppos=listcontainsnocase(querystring_recordreturn,"PageNum_RecordReturn=","&")>
<cfif temppos neq 0>
<cfset querystring_recordreturn=listdeleteat(querystring_recordreturn,temppos,"&")>
</cfif>


<cfoutput>
<tr>
<td width="15%"><cfif pagenum_recordreturn gt 1><a href="#CurrentPage#?PageNum_RecordReturn=1" class="bold">first</a></cfif><img src="../images/1x1clear.gif" width="1" height="1" border="0" alt=" "></td>
<td width="15%"><cfif pagenum_recordreturn gt 1><a href="#CurrentPage#?PageNum_RecordReturn=#Max(DecrementValue(PageNum_RecordReturn),1)#" class="bold">previous</a></cfif><img src="../images/1x1clear.gif" width="1" height="1" border="0" alt=" "></td>
<td width="40%" class="c"><b>Records #StartRow_RecordReturn# to #EndRow_RecordReturn# of</b> <strong>#RecordReturn.RecordCount#</strong></td>
<td width="15%" class="r"><cfif pagenum_recordreturn lt totalpages_recordreturn><a href="#CurrentPage#?PageNum_RecordReturn=#Min(IncrementValue(PageNum_RecordReturn),TotalPages_RecordReturn)#" class="bold">next</a></cfif><img src="../images/1x1clear.gif" width="1" height="1" border="0" alt=" "></td>
<td width="15%" class="r"><cfif pagenum_recordreturn lt totalpages_recordreturn><a href="#CurrentPage#?PageNum_RecordReturn=#TotalPages_RecordReturn#" class="bold">last</a></cfif><img src="../images/1x1clear.gif" width="1" height="1" border="0" alt=" "></td>
</tr>
</cfoutput>

Thanks
TOPICS
Getting started
301
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2008 Aug 28, 2008
LATEST
who knows! where's your code?
(hint: post relevant code snippets when asking question like 'why
doesn't this code of mine work like this')

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources