You need to sign in to do that
Don't have an account?
GET response on Submitting HTML Form from Visualforce
Hi,
I am Using a Visualforce Page with HTML Form which POST s Data to a URL.
When i Click Submit (HTML) Button the form action is calling a External URL(which i am sending Data) , and on that Page some response is Displayed.
Can we get that response back to Visualforce or Pass to Controller so that I can save that back in Salesforce.
Please suggest any solution.
Thanks in advance.
My Form Code:
<apex:page>
<form name="form1" method="post" action= "https://www1.abc.com/partners/abcd/" target="blank">
<input type="submit" name="Submit" value="Initiate"/>
<input type="hidden" name="ExpressXML" value="{!XML}"/>
</form>
</apex:page>
Why dont you prefer using HTTP Request methods on button click instead of using html?
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_httprequest.htm
Hi,
Thanks for the Reply,
This Approach i used but in this approach i am un able to pass XML to the SERVER, its giving response as XML content Missing.
I tried different ways like sending XML as Setbody, setbodydocument , even set header etc.. but i am un able to send the XML to their server.
so i am trying if i can read the response using the HTML form.
Thanks