hph Posted April 23, 2019 Share Posted April 23, 2019 procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); var sid: TUniGUISession; ActiveSessions : TUniGUISessions; I : Integer; begin if ARequestInfo.URI='/test/send' then begin SessionManager.Sessions.Lock; ActiveSessions := UniServerModule.SessionManager.Sessions; try for I := 0 to ActiveSessions.SessionList.Count -1 do begin sid := ActiveSessions.SessionList[I]; sid.AddJS('doShowText("Hello")'); // --- dont execute!?! end; finally SessionManager.Sessions.Unlock; end; AResponseInfo.ResponseNo := 200; AResponseInfo.ContentText := 'success'; AResponseInfo.WriteContent; Handled := True; end; end; Hi Why is this javascript function doShowText() in this active session not executing? It works if I call directly from UnimForm.UniSession.AddJS(), but not over the SessionManager...? best regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.