macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: undefined variable

Subject: Re: undefined variable
From: GArlington
Date: Wed, 15 Aug 2007 02:53:29 -0700
Newsgroups: macromedia.coldfusion.cfml_general_discussion

On 15 Aug, 10:35, "phil1943" <webforumsu...@xxxxxxxxxxxxxx> wrote:
> Hello, I am setting up a basic shopping cart.
>
>  Upon (form) submission of an "add to cart" button I get an undefined variable
> error.
>
>  This is because the "add to cart" form is submitting to "thispage" i.e 
> itself,
> which contains an invoked database search function.
>  That search function relies on an externally provided keyword which is passed
> from another webpage upon the first load of that page.
>  How can I make that externally submitted variable exist for the duration of
> multiple reloads of that page ie. each time the "add to cart" buttons are
> submitted ?
>
>  thanks kindly for any help.

If this "externally provided keyword" must have a value use hidden
field in the form with the same name and populate it with keyword
value.
i.e.
<cfparam name="form.keywordName" default="#url.keywordName# />

<form..>
<input type="hidden" name="keywordName" value="#form.keywordName#" />


<Prev in Thread] Current Thread [Next in Thread>