Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Multiple pages for search

Status
Not open for further replies.

potinenip

Programmer
Jul 12, 2000
35
0
0
US
Visit site
I have problem making the links work. I am trying to implement the CFPage_thru custom tag given in allaire site.<br>I am not able to quite figure out why the current page link is not working? When i click on 2 or 3 then it doesn't work.<br>Praveen<br>This is my code:<br><br>&lt;HTML&gt;&lt;HEAD&gt;<br> &lt;TITLE&gt;PostNewHome - Entry Action&lt;/TITLE&gt;<br>&lt;/HEAD&gt;&lt;BODY bgcolor=&quot;ffffff&quot;&gt;<br><br>&lt;FONT size=&quot;+1&quot;&gt;PostNewHome&lt;/FONT&gt; &lt;BR&gt;<br>&lt;FONT size=&quot;+2&quot;&gt;&lt;B&gt;Search was successfully Executed&lt;/B&gt;&lt;/FONT&gt;<br><br>&lt;!--- Initialize constants ---&gt;<br>&lt;CFSET MaxRows=10&gt;<br><br>&lt;CFPARAM Name=&quot;CurrentPage&quot; Default=&quot;1&quot;&gt; <br>&lt;CFPARAM NAME=&quot;Start&quot; DEFAULT=&quot;1&quot;&gt;<br>&lt;cfparam name=&quot;PropertyCity&quot; default=&quot;&quot;&gt;<br>&lt;cfparam name=&quot;PropertyBedrooms&quot; default=&quot;0&quot;&gt;<br>&lt;cfparam name=&quot;PropertyBathrooms&quot; default=&quot;0&quot;&gt;<br>&lt;cfparam name=&quot;PropertyTypeCode&quot; default=&quot;&quot;&gt;<br>&lt;cfparam name=&quot;PropertyPrice&quot; default=&quot;0&quot;&gt;<br><br><br>&nbsp;&nbsp;&lt;cfquery name=&quot;GetHouse&quot; datasource=&quot;PostYourHome&quot;&gt;<br>&nbsp;&nbsp; SELECT * from HomesOrLands<br>&nbsp;&nbsp; WHERE&nbsp;&nbsp;&nbsp;PropertyCity = '#PropertyCity#'<br>&nbsp;&nbsp;&lt;/cfquery&gt;<br>&nbsp;&nbsp;<br>&lt;!--- CF_PageThru will help us break up the product listing into pages.<br> The ADDEDPATH parameter is used to pass the search parameter CLASS<br> through the links of the generated page-through navigation.<br>---&gt;<br>&lt;CF_PAGETHRU TOTALRECORDS=&quot;#GetHouse.RecordCount#&quot;<br> CURRENTPAGE=&quot;#CurrentPage#&quot;<br> TEMPLATEURL=&quot;#SCRIPT_NAME#&quot;<br> DISPLAYCOUNT=&quot;10&quot;<br> PAGEGROUP=&quot;3&quot;&gt;<br><br>&lt;CFOUTPUT&gt;<br><br>&lt;h3&gt;House Listing&lt;/h3&gt;<br><br>&lt;!--- Output the page-through navigation here.&nbsp;&nbsp;The HTML for the navigation was<br> generated by CF_PageThru and returned in the PT_PageThru variable.<br>---&gt;<br>&lt;TABLE BORDER=&quot;1&quot;&gt;<br><br><br>&lt;!--- Table headers ---&gt;<br>&lt;TR&gt;<br>&nbsp;&lt;TH&gt;Number&lt;/TH&gt;<br>&nbsp;&lt;TH&gt;City&lt;/TH&gt;<br>&nbsp;&lt;TH&gt;Property Type&lt;/TH&gt;<br>&nbsp;&lt;TH&gt;Price&lt;/TH&gt;<br>&nbsp;&lt;TH&gt;Bedrooms&lt;/TH&gt;<br>&nbsp;&lt;TH&gt;Bathrooms&lt;/TH&gt;<br><br>&lt;/TR&gt;<br><br>&lt;p&gt;#PT_PageThru#<br>&lt;p&gt;<br>&lt;table border&gt;<br>&lt;/CFOUTPUT&gt;<br><br><br><br>&lt;!--- Show part of the product listing here.&nbsp;&nbsp;CF_PageThru calculated<br> PT_StartRow and PT_EndRow based on the current page of the<br> listing that is to be displayed (CurrentPage parameter of CF_PageThru).<br>---&gt;<br><br>&lt;CFLOOP Query=&quot;GetHouse&quot; StartRow=&quot;#PT_StartRow#&quot; EndRow=&quot;#PT_EndRow#&quot;&gt;<br>&lt;CFOUTPUT&gt;<br>&lt;tr&gt;<br> <br>&nbsp;&nbsp;&lt;TD&gt;#GetHouse.CurrentRow#&lt;/TD&gt;<br>&nbsp;&nbsp;&lt;TD&gt;#PropertyCity#&lt;/TD&gt;<br>&nbsp;&nbsp;&lt;TD&gt;#PropertyTypeCode#&lt;/TD&gt;<br>&nbsp;&nbsp;&lt;TD&gt;#PropertyPrice#&lt;/TD&gt;<br>&nbsp;&nbsp;&lt;TD&gt;#PropertyBedrooms#&lt;/TD&gt;<br>&nbsp;&nbsp;&lt;TD&gt;#PropertyBathrooms#&lt;/TD&gt;<br>&lt;!--- <br>&nbsp;&lt;td align=&quot;center&quot; valign=&quot;middle&quot;&gt;<br>&nbsp;&nbsp;&lt;a href=&quot;detail.cfm?MFRModel=#MFR_Model#&CurrentPage=#CurrentPage#&quot;&gt;Add&lt;/a&gt;<br>&nbsp;&nbsp;&lt;/td&gt;<br>---&gt;<br>&nbsp;&lt;/TR&gt;<br>&lt;/CFOUTPUT&gt;<br>&lt;/CFLOOP&gt;<br><br>&lt;CFOUTPUT&gt;<br>&lt;/table&gt;<br><br>&lt;!--- Output the page-through navigation again here. ---&gt;<br>&lt;p&gt;#PT_PageThru#<br><br>&lt;!--- Display what range in the product list is being displayed. ---&gt;<br>&lt;p&gt;Displaying #PT_StartRow#-#PT_EndRow# of &lt;Font color=&quot;red&quot;&gt;&lt;b&gt;#GetHouse.RecordCount#&lt;/b&gt;&lt;/font&gt; Houses.<br>&lt;/CFOUTPUT&gt;<br>
 
Well without seeing the code for CF_pagethru it's pretty hard to tell if your doing the right thing.<br><br> <p>Russ Michaels<br><a href=mailto:russ@satachi.com>russ@satachi.com</a><br><a href= Internet Development</a><br>For my personal book recommendations visit <br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top