• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Need help passing form variables

LEGEND ,
Nov 21, 2006 Nov 21, 2006

Copy link to clipboard

Copied

My application has a search page and a results page, on the results page I
used the "<previous - next>" DW server behaviors to split my results up to
10 records per page. I have some form variables from my search page that
pass to the initial results page, but when I click "next" for my next 10
records, all the form variables are lost. So, my question is how can I pass
these variables to the next pages??

--
Dusty


TOPICS
Advanced techniques

Views

453

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2006 Nov 21, 2006

Copy link to clipboard

Copied

you can use hidden form fields (and a 'submit' button for 'next' instead of a text link...or have the text link trigger a JS function that would do a form submit()).

you could put the variables into the session scope.

if you absolutely had to (and hopefully there wouldn't be many), you could pass them in the URL (but for various reasons, i'd make that the ultimate 'no other option' plan).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 21, 2006 Nov 21, 2006

Copy link to clipboard

Copied

Could you give me a code example? Say my search form has 3 variables: city,
maximumprice, and minimumprice.

at the top of my results page I have :

<cfparam name="form.city" default=" ">
<cfparam name="form.minimumprice" default=" ">
<cfparam name="form.maximumprice" default=" ">

and my link to the previous-next page:

<a
href="<cfoutput>#CurrentPage#?PageNum_wrmls=#Max(DecrementValue(PageNum_wrml
s),1)##QueryString_wrmls#</cfoutput>">Previous</a> <a
href="<cfoutput>#CurrentPage#?PageNum_wrmls=#Min(IncrementValue(PageNum_wrml
s),TotalPages_wrmls)##QueryString_wrmls#</cfoutput>">Next</a>



Thanks for the help!

Dusty




"[CJ]" <webforumsuser@macromedia.com> wrote in message
news:ejva05$pd1$1@forums.macromedia.com...
> you can use hidden form fields (and a 'submit' button for 'next' instead
of a
> text link...or have the text link trigger a JS function that would do a
form
> submit()).
>
> you could put the variables into the session scope.
>
> if you absolutely had to (and hopefully there wouldn't be many), you
could
> pass them in the URL (but for various reasons, i'd make that the ultimate
'no
> other option' plan).
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 21, 2006 Nov 21, 2006

Copy link to clipboard

Copied

Anybody??

--
Dusty Carr
IT Manager
Coldwell Banker SSK
dcarr@coldwellbankerssk.com
478-953-8595


"Dusty Carr" <dcarr@coldwellbankerssk.com> wrote in message
news:ejvbkm$rbk$1@forums.macromedia.com...
> Could you give me a code example? Say my search form has 3 variables:
city,
> maximumprice, and minimumprice.
>
> at the top of my results page I have :
>
> <cfparam name="form.city" default=" ">
> <cfparam name="form.minimumprice" default=" ">
> <cfparam name="form.maximumprice" default=" ">
>
> and my link to the previous-next page:
>
> <a
>
href="<cfoutput>#CurrentPage#?PageNum_wrmls=#Max(DecrementValue(PageNum_wrml
> s),1)##QueryString_wrmls#</cfoutput>">Previous</a> <a
>
href="<cfoutput>#CurrentPage#?PageNum_wrmls=#Min(IncrementValue(PageNum_wrml
> s),TotalPages_wrmls)##QueryString_wrmls#</cfoutput>">Next</a>
>
>
>
> Thanks for the help!
>
> Dusty
>
>
>
>
> "[CJ]" <webforumsuser@macromedia.com> wrote in message
> news:ejva05$pd1$1@forums.macromedia.com...
> > you can use hidden form fields (and a 'submit' button for 'next' instead
> of a
> > text link...or have the text link trigger a JS function that would do a
> form
> > submit()).
> >
> > you could put the variables into the session scope.
> >
> > if you absolutely had to (and hopefully there wouldn't be many), you
> could
> > pass them in the URL (but for various reasons, i'd make that the
ultimate
> 'no
> > other option' plan).
> >
>
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 21, 2006 Nov 21, 2006

Copy link to clipboard

Copied

LATEST
The tutorial at http://tutorial39.easycfm.com/ should give you some ideas. Once you understand it, you'll know how to use session variables to preserve the form data.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2006 Nov 21, 2006

Copy link to clipboard

Copied

I'd use session variables, setting them when you move to the first page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation