Solved

cfhttp

Posted on 2001-09-03
11
325 Views
Last Modified: 2013-12-24
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.
0
Comment
Question by:simi
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 5

Expert Comment

by:Yog
ID: 6451477
hmm, you can't. Sessions wont work across domain. You have to try cookie.
0
 
LVL 1

Expert Comment

by:MediaStorm
ID: 6451811
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
0
 

Author Comment

by:simi
ID: 6452015
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.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 6458311
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>
0
 

Author Comment

by:simi
ID: 6458326
I meant I want to save the forms between sessions.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 14

Expert Comment

by:Scott Bennett
ID: 6458346
oh, then you can save them into a database table or save them into client variables. then access them when you need them
0
 

Author Comment

by:simi
ID: 6458410
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.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 6458439
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
0
 
LVL 1

Accepted Solution

by:
snakehollywood earned 25 total points
ID: 6466704
simply pull the data out of the database and populate the form next time the user returns. No need to use cfhttp.

0
 

Author Comment

by:simi
ID: 6466815
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.
0
 
LVL 1

Expert Comment

by:snakehollywood
ID: 6466830
just out of interested, I saw someone once post that you can distribute points.
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wordpress limitations 4 105
AWS Advice on using WHM/cPanel 1 69
Moving web servers into a DMZ? 3 49
How code a 301 redirect for folder files -> 1 file 2 22
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now