billyChou Posted August 3, 2017 Share Posted August 3, 2017 use URLParameters return new page without form, with Json Data. Thanks Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2017 Share Posted August 3, 2017 Hi, Can you clarify your question again please? Link to comment Share on other sites More sharing options...
billyChou Posted August 3, 2017 Author Share Posted August 3, 2017 reference Demos\Desktop\URLParameters use http post Url -> http://localhost:8077/?userid=BB&pwd=AA return Json Data (with Develop RESTful API use in UNIGUI Thanks Link to comment Share on other sites More sharing options...
billyChou Posted August 6, 2017 Author Share Posted August 6, 2017 in Demos\Desktop\HTTP Post Callback - Browser Window modify procedure TMainForm.UniButton1Click(Sender: TObject);begin UniSession.UrlRedirect('http://www.google.com'); // --> it's ok end; add --------------------------------------------------------------------------- procedure TMainForm.UniFormShow(Sender: TObject);var sJson, sText : string; AUrl: string;begin sJson := ''; sText :=UniApplication.Parameters.Values['json']; if sText= 'test' then begin UniSession.UrlRedirect('http://www.google.com');// -> error halt end;end; url test localhost:8077/?json=test --> browser halt Thanks Link to comment Share on other sites More sharing options...
Ron Posted August 7, 2017 Share Posted August 7, 2017 Something locks up when I try this too, who knows why, can use a timer as a workaround: procedure TMainForm.UniFormShow(Sender: TObject);var sJson, sText : string; AUrl: string;begin sJson := ''; sText :=UniApplication.Parameters.Values['json']; if sText= 'test' then begin uniTimer1.Enabled:=true; end;end;procedure TMainForm.UniTimer1Timer(Sender: TObject);begin UniSession.UrlRedirect('http://www.google.com');//-> no error uniTimer1.Enabled:=false;end; Link to comment Share on other sites More sharing options...
billyChou Posted August 7, 2017 Author Share Posted August 7, 2017 Thanks 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