Jump to content

Recommended Posts

Posted

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

Posted

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;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...