Solved

cfhttp

Posted on 2001-09-03
11
328 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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
 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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