controlr
asked on
IWForm - OnClose effect
I have something I need to do when a uses leaves the page.. (maybe the site too)
I tried the OnDestroy but it does not get triggered.
Any idea on how to implement this ?
Something like:
procedure TmainForm.OnClose( sender: TObject);
begin
callSomeSillyLittleProc(pa ram);
end;
TIWUserSession can NOT USED! since it requires hugh overhead (too many users)
TIA
I tried the OnDestroy but it does not get triggered.
Any idea on how to implement this ?
Something like:
procedure TmainForm.OnClose( sender: TObject);
begin
callSomeSillyLittleProc(pa
end;
TIWUserSession can NOT USED! since it requires hugh overhead (too many users)
TIA
ASKER
JImmy...
The user does not hit any button.. .. he simply closed the browser.. (CTRL+F4) and does not have any interaction with the page.
THerefore.. there is never a call made to release.. and thus (like i said) the destroy does not get triggered.
There should be a onTerminate events that gets triggered when browser is closed or the user goes to another URL.... but I think its handles in teh Session timeout and there is no way to intercept it.. maybe eBob has a trick :)
The user does not hit any button.. .. he simply closed the browser.. (CTRL+F4) and does not have any interaction with the page.
THerefore.. there is never a call made to release.. and thus (like i said) the destroy does not get triggered.
There should be a onTerminate events that gets triggered when browser is closed or the user goes to another URL.... but I think its handles in teh Session timeout and there is no way to intercept it.. maybe eBob has a trick :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i can use that :)
Thanks!
Thanks!
Open in new window
But if you close with WebApplication.Terminate then you can think of something like this (smart but not the best):
Make "callSomeSillyLittleProc(p
pass it as a parameter to WebApplication.Terminate(c
Make sure the function is returning blank (Result := '');
Open in new window