OnURLRequest

<< Click to Display Table of Contents >>

Navigation:  Classes > TIWAppForm > Events >

OnURLRequest

Use this event to implement special processment when a IW form is activated through a URL Request (ex: http://www.yoursite.com/green.html).

 

SIGNATURE=IWAppForm.TIWAppForm.OnURLRequest

 

ETYPE=Event

 

Declaration:

Delphi:

published property OnURLRequest: TOnURLRequest;

C++:

__published: __property TOnURLRequest OnURLRequest;

 

Description: This is OnURLRequest, a member of class TIWAppForm.

 

You need to include unit IW.Http.Request in your uses clause (interface section).

 

procedure TGreenForm.IWAppFormURLRequest(aSender: TIWAppForm;

 aRequest: THttpRequest);

begin

 if Pos(aRequest.Referer, '192.168') = 0 then begin

   WebApplication.TerminateAndRedirect('http://www.atozed.com');

 end;

end;

 

initialization

 TGreenForm.SetURL('/', 'green.html');