NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: BradT on December 19, 2022, 03:39:07 PM

Title: What Triggers the Busy Image?
Post by: BradT on December 19, 2022, 03:39:07 PM
What makes the busy image unhide and hide?
Title: Re: What Triggers the Busy Image?
Post by: Bruce on December 19, 2022, 08:12:21 PM
many things.
Title: Re: What Triggers the Busy Image?
Post by: BradT on December 20, 2022, 06:48:14 AM
Is there a way to force it to hide and unhide?
Title: Re: What Triggers the Busy Image?
Post by: Alberto on December 20, 2022, 01:24:11 PM
Hi, you can use theese:

   p_web.Script('$("#_busy").css(''left'',''50%'').css(''top'',''40%'').css(''display'',''flex'');')

   p_web.Script('$("#_busy").css(''display'',''none'');')

but many asinc methods hides the busy, so, good luck...
Title: Re: What Triggers the Busy Image?
Post by: Bruce on December 22, 2022, 09:16:44 PM
it's just a div id="_busy"
So yes, you can hide or show it.

In javascript (client side) you can just do
$('#_busy).hide()
or
$('#_busy).show()

On the server side it's more complex, because you can include script in a reply, but it'll only get executed when the reply is completely formed and completely sent to the client.

so typically you unhide on the client side, and hide on the server side.

Obviously you need to full understand how the engine is using it as well, because there are other things hiding and unhiding it.

In summary - you probably should not be hiding and unhiding that graphic yourself. If you want to notify the user of things happening, use your own graphic, or a progress bar.

cheers
Bruce