stas Posted February 6, 2015 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. Quote
Sherzod Posted February 6, 2015 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. Quote
stas Posted February 6, 2015 Author 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(); Quote
Sherzod Posted February 6, 2015 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; Quote
stas Posted February 6, 2015 Author 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 Quote
Sherzod Posted February 6, 2015 Posted February 6, 2015 Maybe like this:setTimeout ('// js code ...', 10000) Quote
Administrators Farshad Mohajeri Posted February 6, 2015 Administrators 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. Quote
Sistema Fenix Posted February 18, 2016 Posted February 18, 2016 Try this: http://forums.unigui.com/index.php?/topic/6348-screen-mask-simply-long-process-solution-with-8-themes/ Quote
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.