: In both beginner Ben Forta CF 5 and MX books there is a great example by
: Nate Weiss to output a table displaying 10 rows. This example provides
: you a next and previous button to view the results. This is listed in
: the MX book located in chapter 21 and is called NextN5.cfm.
I don't have access to this book, but I do know what you're trying to do.
: In the left frame �A� I have a form with lets say 2 fields FirstName &
: LastName the user enters information into a text field clicks a submit
: button. Then the person�s record shows up on the right side �B�. (To
: this point it works!)
Good.
: Issue:
:
: Let�s say the user selects last name that beings with a �C� and they get
: 100 records.
:
: Currently when they click next on top of the table they should show the
: next 10 people that have last names that begins with �C� due to the
: SPECIFIED CRITERIA passed to the CFQUERY. It works for the initial pass
: but if I click Show All I get everyone in the database. So my search
: criteria is being bypassed some how.
What does the "show all" url look like? Are you passing and grabbing the
data, or are you just calling the .cfm without passing anything and
therefore getting defaults?
: Can the code be modified to remember the parameters passed to it when
: you click next and show all? (NextN5.cfm)
You could certainly, for example, stick the parameters in a session
variable. Shoot, if you wanted to cache the query you could stick the
entire result set in a session variable and reduce the number of trips to
your DB server.
: Right now it uses URL parameters but I need a way of keeping information
: on each page as the users� clicks through the results.
When you say "keeping information" doesn't passing the appropriate URL
params do that? Keep in mind that any info passed in the URL or the GET
method of a form shows up in the URL scope /not/ the FORM scope, so you will
have to either look for it both places or /always/ pass it as part of the
URL.
: I hope this is clearer than my post earlier.
Maybe I'm just being dense, but it's not really any clearer to me. If I
understand correctly, when you POST from a form you get the correct result,
but when you open the page passing the parameters via the URL, you get
incorrect results -- specifically, you get the default results.
If that's not a correct assessment of the problem then obviously my
suggestions are going to be off-base.
If that is the case, but either my suggestions don't work or don't make
sense, tell me that it doesn't work or doesn't make sense so that either I
(or someone else) can try a different tack or explain it differently.
Feel free to keep up this topic as long as you need to get this done, or you
can contact me off-list at [EMAIL PROTECTED] -- I'll be out shopping a good
bit this evening but plan to check my mail tonight and tomorrow and will
help all I can.
--Ben Doom
Programmer [EMAIL PROTECTED]
Moonbow Software 606.864.0041 x4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.