I'm working on a Coldfusion page that takes information from a form and posts back to the same page. However, I have a CFHTTP URL string that I want to POST to a PHP page and I want to open in a separate page as well (still leaving the original POST page open. I thought CFHTTP would accept a "target - blank" value but it doesn't. Here's my code:
<cfhttp method="Post" url="https://www.foo.com/foocorp/restrict/fpdf/letter.php" result="adverseResponse">
<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="Header" name="TE" value="deflate;q=0">
<cfoutput>
<cfif isdefined( "b_firstname" )><cfhttpparam name="B_FIRSTNAME" type="formField" value="#B_FIRSTNAME#"></cfif>
<cfif isdefined( "b_lastname" )><cfhttpparam name="B_LASTNAME" type="formField" value="#B_LASTNAME#"></cfif>
<cfif isdefined( "prop_address" )><cfhttpparam name="PROP_ADDRESS" type="formField" value="#PROP_ADDRESS#"></cfif>
<cfif isdefined( "prop_city" )><cfhttpparam name="PROP_CITY" type="formField" value="#PROP_CITY#"></cfif>
<cfif isdefined( "prop_state" )><cfhttpparam name="PROP_STATE" type="formField" value="#PROP_STATE#"></cfif>
<cfif isdefined( "prop_zip" )><cfhttpparam name="PROP_ZIP" type="formField" value="#PROP_ZIP#"></cfif>
</cfoutput>
</cfhttp>
Is there another CF element I should be using instead of CFHTTP?