Saturday 28 Jan 2012   
Add Comment

Cfhttp simple example

ColdFusion Tutorial #30

This is a simple example of cfhttp in action.

demo.cfm

Yahoo provides access to very up-to-date exchange rate information. In this example, I call a URL which will get the exchange rate for 1 United States Dollar and convert it to Euro. The tiny javascript function allows you to put in any number you want and convert it from USD to Euro.



Demo

See this code running!


Download

Download this code as a zip!


Comments

This is a great example. Thanks for posting.
One question:
Do these tags need to be between the <cfoutput> tag? <b /><b />
chiponium @ Tuesday 26 May 2009 - 02:02:32 AM

yes the cfoutput tags are needed to evaluated the #eruro# variable .
Paul Kukiel @ Wednesday 27 May 2009 - 11:07:57 AM

Hi Paul,
I tried to implement this code,it throws a connection failure error, but while running the demo example in the website it perform correctly.Can you please answer me ,why I am getting a connection failure message
Sonu Agarwal @ Thursday 13 Jan 2011 - 12:06:29 AM

Click button to add a comment


Author

Paul Kukiel


Published

Saturday 14 Mar 2009

Tags

cfhttp  cfoutput  cfset