I may be wrong, but I think the problem is not in the code, but in the
ending of the FORM  tag.  If the code you copied is exactly as you have
written it:

<FORM ACTION="getcatalog2.cfm" Method="POST"
<input type="hidden" name="start" value="#NextStart#">

 then the FORM tag is not ended, until the second line; the line with the
input tag.  So, the form does not pass the field "start".  The CFPARAM sets
start to 1, so you keep getting the same records.


Marc Stormes
AssetLine.com




----- Original Message -----
From: "Robert Orlini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 09, 2000 10:21 AM
Subject: next 5 records


> Hello,
>
> I followed a coded example from QUE's CF Web App Construction Kit 2nd ed.
> book. It displays 5 records at a time and then displays a button which a
> user can click to display the next 5 records and so on.
>
> The code given, however, displays the first set of 5 records and when I
> click the "Next 5 records" button it STILL displays the first 5 records;
it
> does not go to the next set of five records and so on.
>
> Any suggestions/ corrections please? Thanks.
>
> Robert Orlini
> Web Admin
> ========================================================================
>
> Here is some of the code(I took out some of the HTML and data fields to
make
> it easy to read):
>
> <CFSET MaxRows = 5>
>
> <CFPARAM Name="start" Default="1">
> <CFPARAM Name="id" Default="">
> <CFPARAM Name="orderdate" Default="">
> <CFPARAM Name="customer" Default="">
> <CFPARAM Name="state" Default="">
> <CFPARAM Name="country" Default="">
> <CFPARAM Name="institution" Default="">
> <CFPARAM Name="phone" Default="">
> <CFPARAM Name="email" Default="">
> <CFPARAM Name="city" Default="">
> <CFPARAM Name="address" Default="">
>
> <cfquery name="Getcustomer" datasource="catalog99">
>
> SELECT * FROM 99catalog
> Where id = id
> Order by id
>
> </cfquery>
>
> <CFOUTPUT QUERY="Getcustomer" Startrow="#start#" Maxrows="#maxrows#">
>
> (Data is output here)
>
> </cfoutput>
>
> <CFSET NextStart = Start + Maxrows>
>
> <CFOUTPUT>
> <FORM ACTION="getcatalog2.cfm" Method="POST"
> <input type="hidden" name="start" value="#NextStart#">
> <input type="hidden" name="customer" value="#customer#">
> <input type="hidden" name="institution" value="#institution#">
> <input type="hidden" name="state" value="#State#">
> <input type="hidden" name="city" value="#city#">
> <input type="hidden" name="country" value="#country#">
> <input type="hidden" name="institution" value="#institution#">
> <input type="hidden" name="orderdate" value="#orderdate#">
> <input type="hidden" name="phone" value="#phone#">
> <input type="hidden" name="email" value="#email#">
>
> <Input type="submit" value="Next #maxrows#">
> </form>
> </cfoutput>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to