stas Posted February 6, 2015 Share Posted February 6, 2015 Hello. How show Wait message without attached control For Example proccedure TUniForm.FormCreate(SEnder:TObject); begin ScreenMaskWithoutAttachedControl.Enabled=True; try VeryLongTimeInternalProcedure; finally ScreenMaskWithoutAttachedControl.Enabled=False; end; end; Thank You. Link to comment Share on other sites More sharing options...
Sherzod Posted February 6, 2015 Share Posted February 6, 2015 Hi Stas! If on JS, can something like this: UniSession.AddJS('uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();'); try ... VeryLongTimeInternalProcedure; finally UniSession.AddJS('uniVars._mask.hide();'); end; ... Best regards. Link to comment Share on other sites More sharing options...
stas Posted February 6, 2015 Author Share Posted February 6, 2015 Thanks, but dont work UniSession.AddJS('uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();'); try Sleep(10000); finally UniSession.AddJS('uniVars._mask.hide();'); end; Response text is uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();uniVars._mask.hide(); Link to comment Share on other sites More sharing options...
Sherzod Posted February 6, 2015 Share Posted February 6, 2015 Though of course this is not what you wanted, but you can then put UniSession.AddJS ('uniVars._mask.hide ();'); at the end of the procedure in VeryLongTimeInternalProcedure; Link to comment Share on other sites More sharing options...
stas Posted February 6, 2015 Author Share Posted February 6, 2015 The problem is that the response from the server in the same sentence Can I send in first Response uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); after that process Sleep(10000) and in second Responce send UniSession.AddJS('uniVars._mask.hide();'); Of cource i can use unitimer but this is undesirable Link to comment Share on other sites More sharing options...
Sherzod Posted February 6, 2015 Share Posted February 6, 2015 Maybe like this:setTimeout ('// js code ...', 10000) Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 6, 2015 Administrators Share Posted February 6, 2015 Hi Stas! If on JS, can something like this: UniSession.AddJS('uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();'); try ... VeryLongTimeInternalProcedure; finally UniSession.AddJS('uniVars._mask.hide();'); end; ... Best regards. It will not work because all JS codes will be sent to server at the end of Ajax request. Link to comment Share on other sites More sharing options...
stas Posted February 6, 2015 Author Share Posted February 6, 2015 setTimeout is the best way Link to comment Share on other sites More sharing options...
Sistema Fenix Posted February 18, 2016 Share Posted February 18, 2016 Try this: http://forums.unigui.com/index.php?/topic/6348-screen-mask-simply-long-process-solution-with-8-themes/ 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