Adobe COLDFUSION 9 Manual page 1242

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<cfhttp method="Get"
url="http://127.0.0.1/myapps/text.txt"
name="juneorders"
textqualifier="">
<cfoutput query="juneorders">
OrderID: #OrderID#<br>
Order Number: #OrderNum#<br>
Order Date: #OrderDate#<br>
</cfoutput>
<!--- Now substitute different column names --->
<!--- by using the columns attribute --->
<hr>
Now using replacement column names<br>
<cfhttp method="Get"
url="http://127.0.0.1/myapps/text.txt"
name="juneorders"
columns="ID,Number,ODate,SDate,Name,Address"
textqualifier="">
<cfoutput query="juneorders">
Order ID: #ID#<br>
Order Number: #Number#<br>
Order Date: #SDate#<br>
</cfoutput>
Save the file as query_textfile.cfm in the myapps directory under your web_root and view it in the web browser.
4
Using the cfhttp Post method
Use the Post method to send cookie, form field, CGI, URL, and file variables to a specified ColdFusion page or CGI
program for processing. For Post operations, use the cfhttpparam tag for each variable you want to post. The Post method
passes data to a specified ColdFusion page or an executable that interprets the variables being sent and returns data.
For example, when you build an HTML form using the Post method, you specify the name of the page to which form
data is passed. You use the Post method in cfhttp in a similar way. However, with the
the Post does not, itself, display anything.
Pass variables to a ColdFusion page
1
Create a ColdFusion page with the following content:
Last updated 8/5/2010
tag, the page that receives
cfhttp
1237

Advertisement

Table of Contents
loading

Table of Contents