Link to home
Start Free TrialLog in
Avatar of simi
simi

asked on

cfhttp

Hi,

I am using the <cfhttp tag in combination with the <cfhttpparam with the post method.
The problem I have is that the target of the post does not recive the Session variables.
I see I can set up the <cfhttp tag to work with form, url, cgi and file variables but I did not see how the Session or Client ones can be passed.

Thanks.
Avatar of Yog
Yog

hmm, you can't. Sessions wont work across domain. You have to try cookie.
Any variables must be passed across in one of two ways:

1) As URL variables (http://www.xyz.com/index.cfm?session=1
2) As form variables
(input type="hidden" name="session" value="#session.cfid#")

Alternatively you might also want to look at WDDX and/or XML.

MediaStorm
Avatar of simi

ASKER

What I am trying to do is to save the state of a form and post it at a later time.
Like I have a form, the user checks some of the forme elemens, and then can either perform a post right away or save it and perform the post later. If so, I load all the values saved and perform a cfhttp.

Is there any better way for this ?
Thanks.
Avatar of Scott Bennett
what you can do is save the original form post into session variables then when you wish to post them to the other server convert them into url or formfield variables using <cfhttp>
Avatar of simi

ASKER

I meant I want to save the forms between sessions.
oh, then you can save them into a database table or save them into client variables. then access them when you need them
Avatar of simi

ASKER

That's what I did.
I saved them on a file.
Then I can recreate a form and cfhttp it.
I was just wondering if there is a better way.
The difference is that when I use cfhttp the url remains the one of the caller, while using a regular form, the submit makes the url to change.
well, if you want the URL to change you can use cfhttp to send the form data then <cflocation> to send the user to the other site.

-Scott
ASKER CERTIFIED SOLUTION
Avatar of snakehollywood
snakehollywood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of simi

ASKER

I dont't want to show the form, just to run the report.
Anyway I will create hidden fields in a form, then post it on load using a java script statement.
Thanks to all but I can assign the points to only one.
just out of interested, I saw someone once post that you can distribute points.