O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Client Variables

Client variables are ideal for storing things like user preferences, recent form entries, and other types of values that you don’t want to force your users to provide over and over again.

Remembering Values for Next Time

Consider a typical search form, in which the user types what they are looking for and then submits the form to see the search results. It might be nice if the form could remember what the user’s last search was.

The code in Listing 20.6 lets it do just that. The basic idea is that the form’s search criteria field will already be filled in, using the value of a variable called SearchPreFill. The value of this variable is set at the top of the page and will be set to the last search the user ran, if available. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required