This content has been marked as final. Show 3 replies
> Any suggestions?
What you are looking for here is for a bit of a split personality from
the client. I.E. "Please Mr. Browser submit this data to both My server
and Google's server at the same time...".
That is not how the normal http request/response cycle works so you are
going to have to get creative.
My first thought is to go ahead and use the <cfhttp...> functionality.
It is what it is designed for. Then just capture the content and return
it to the client. I.E. <cfoutput>#cfhttp.fileconent#</cfoutput>. I
think that is the easiest and should work fine.
If you truly want the client to submit to both servers, I can only
AJAX asynchronous submit to one of the servers, before doing a normal
post submit to the other. But that sounds much more convoluted to me.
(2) Strip the information you want from the form and send the stripped data synchronously (via Ajax) to your receiving CF script;
(3) Create another function to receive "good" or "bad" responses from the server;
Note that you want to send the data synchronously in case your CF script fails. Otherwise you've lost any chance of collecting the data.
Forgot a third option.
You could have the form submit the data to your server. Do what
processing you desire. Then build a new form with all the data in hidden
fields with the action set to the Google server. Return this form to
the client with javacript that fires in the onload event that
automatically submits the form.
But I'm not sure this would work anymore. Browsers intercept these
abuse by spammers and hackers.