KingOrmon Posted October 30, 2012 Posted October 30, 2012 Hello, I need to send a form via Post to external URL. When proccess be finished this URL send me a POST with results values and I need to access this values. How can I do work in this scenario ? Any sample ? Regards Quote
docjones Posted October 31, 2012 Posted October 31, 2012 This can not be done with unigui. You need use Indy, or another http/sockets library procedure TForm1.Button1Click(Sender: TObject); var http: TIdHttp; params: TStrings; Response: string; begin http := TIdHTTP.Create(Self); params := TStringList.Create; try params.Add('var1=value1'); params.Add('var1=value2'); Response := http.Post('http://dec.clubdelphi.com/temporales/pruebas-post.php', params); ShowMessage('Response: ' + Response); finally http.Free; params.Free; end; end; Quote
KingOrmon Posted October 31, 2012 Author Posted October 31, 2012 Thank you, But I need to get data via post to my url app too... when other websites post data to my app... Regards Quote
KingOrmon Posted October 31, 2012 Author Posted October 31, 2012 Hi, I need to make a post to another website but navigating to this external URL (HTML target=_blank) Regards Quote
KingOrmon Posted November 2, 2012 Author Posted November 2, 2012 I am trying to form code via AddJS: <form id=compra name=compra action="URLK" method=post> <input type=hidden name=Merc value="TPV"> ... </form> Then I try to call form submit: function OnClick(sender, e) { window.document.forms["compra"].submit(); } But it does not work. Regards Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.