On 1/19/06, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote:
> I was using cflocation to redirect to another page to display a list
> of items.  CFLOCATION works except when there are too many items in
> the #dclist# variable (this is a list of document ID's and is in a few
> cases very long).  Here is how I was doing things, but it failed when
> the URL was too long:
>
> <cflocation url="/admin/datacards/?dclist=#dclist#&status=0" addtoken="No">
>
> So, I figured I'd try CFHTTP to get it to act more or less like a form
> submission, which would allow me to skirt the URL length issue.
> Problem is, it doesn't redirect to /admin/datacards/ like it should.
> Is there something wrong with my code, or is my understanding of how
> CFHTTP works when using this method flawed?
>
> <cfhttp method="POST" url="/admin/datacards/" redirect="Yes">
>         <cfhttpparam type="FORMFIELD" name="status" value="0">
>         <cfhttpparam type="FORMFIELD" name="dclist" value="#dclist#">
> </cfhttp>
>

The "url" attribute is the page that the cfhttp call is going to post
to (effectively, the "action" attribute in a standard form tag), not
the page to redirect to. If you want to redirect after processing the
form submission, put a cflocation at the bottom of the action page.
When you specify redirect="yes", cfhttp will "honor" the redirect at
the bottom of the action page.

Regards,
Dave.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229975
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to