Copy link to clipboard
Copied
I need to know how to save a search result set within a hidden div after a updating a record in coldfusion....Thank you all..
Copy link to clipboard
Copied
Save what? To where? And when? This will tell you a great deal about how it needs to be done.
Sorry I could only work 4 of the w's into that short reply.
Copy link to clipboard
Copied
Means that there is a search page...within that page there is a search result section which is visible after one hits the 'search' button for specific information. Then each record on the result set has a link which you can update that record...once the record is updated thru an action.cfm page I need to forward the users to the search.cfm without losing the result set which was already searched.... How will I keep that result set after I update a record since the page will be refreshed?
I dont want to use <cfquery cache....any other idea???
Copy link to clipboard
Copied
Read up in the documentation on ColdFusion's persistant memory scopes, such as Session, Application, Server, Client, Cookie, etc.
These handy scopes are maintained by ColdFusion from request to request.
Using Persistent Data and Locking
http://livedocs.adobe.com/coldfusion/8/htmldocs/sharedVars_01.html
Copy link to clipboard
Copied
I already know how to store in session etc... is there any other way such as http cache?
Copy link to clipboard
Copied
Why do you need another way?
What about using session state is not sufficeint for you requirements?
Copy link to clipboard
Copied
On the search results page send query string (CGI.QUERY_STRING) to the
page that updates the record. After the record is updated redirect to
the variables that was passed to the page.
Adding to Ian's suggestion about your OP:
http://catb.org/esr/faqs/smart-questions.html#beprecise
Mack
Copy link to clipboard
Copied
if I use sessionid or urltoken or jsessionid, will i be able to do what I need to do?....
Copy link to clipboard
Copied
If you keep the page address in the session scope you don't need to
manually pass the session identification tokens (unless the client
browser doesn't accept cookies).
Mack
Copy link to clipboard
Copied
the return page will be search.cfm ...how about after update.... if i return to the search page, i wouldnt get the results which were being generated before update unless i store each search fields in a session var...what I am asking is sessionid or jssessionid specific for that current session or whenever a page is being called, the server creates a new sessionid?....
Copy link to clipboard
Copied
Did you read the link that Ian gave you ? (It's a chapter from the CF
Developer's Guide and it's a pretty good introduction on persisting
state in a web application)
Mack
Copy link to clipboard
Copied
Have you tried "cfsavecontent" tag
If you need just to show the search result you can use "cfsavecontent" tag
<cfsavecontent variable="session.searchresult">
(search result)
</cfsavecontent>
and in search.cfm you just output 'session.searchresult' . I hope you know to handle sessions and please do run tests.
Copy link to clipboard
Copied
searchresult is a struct that i will have to create or not?
Copy link to clipboard
Copied
So after a record is updated you want to keep the original data? I'll contribute the 5th w.
Why?