KingOrmon Posted October 30, 2012 Share 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 Link to comment Share on other sites More sharing options...
docjones Posted October 31, 2012 Share 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; Link to comment Share on other sites More sharing options...
KingOrmon Posted October 31, 2012 Author Share 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 Link to comment Share on other sites More sharing options...
KingOrmon Posted October 31, 2012 Author Share Posted October 31, 2012 Hi, I need to make a post to another website but navigating to this external URL (HTML target=_blank) Regards Link to comment Share on other sites More sharing options...
KingOrmon Posted November 2, 2012 Author Share 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 Link to comment Share on other sites More sharing options...
KingOrmon Posted November 5, 2012 Author Share Posted November 5, 2012 Any suggestion ? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now