|
Display Wait Message While Loading |
Started by Mister RUAN, Jul., 25 2017 1:51 PM - 5 replies |
| |
| | | |
|
| |
Registered member 209 messages Popularité : +1 (1 vote) |
|
Posted on July, 25 2017 - 1:51 PM |
Good Day
How can I display a Wait or Loading image with animation while getting the data from my database. I am using programming to load the data and I use CellDisplayDialog but 1. The .gif doesn't animate and 2. It doesn't popup everytime I load data, pops up every 2nd or 3rd time only. If there is no way what else can I do to indicate that data is busy loading so people don't keep clicking the links.
Regards
Ruan |
| |
| |
| | | |
|
| | |
| |
Posted on July, 25 2017 - 2:21 PM |
Hi
from your post, I gather that we are talking about webdev, but we still don't know what your code is, where it is situated, if it ise ajax or not...
Basically, we are far from knowing what we need to answer correctly
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 7/25/2017 à 5:51 AM, Mister RUAN a écrit :
Good Day
How can I display a Wait or Loading image with animation while getting the data from my database. I am using programming to load the data and I use CellDisplayDialog but 1. The .gif doesn't animate and 2. It doesn't popup everytime I load data, pops up every 2nd or 3rd time only. If there is no way what else can I do to indicate that data is busy loading so people don't keep clicking the links.
Regards
Ruan |
| |
| |
| | | |
|
| | |
| |
Posted on July, 26 2017 - 12:54 PM |
Fabrice Harari wrote:
Hi from your post, I gather that we are talking about webdev, but we still don't know what your code is, where it is situated, if it ise ajax or not... Basically, we are far from knowing what we need to answer correctly Best regards -- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source) More information on http://www.fabriceharari.comLe 7/25/2017 à 5:51 AM, Mister RUAN a écrit : Good Day
How can I display a Wait or Loading image with animation while getting the data from my database. I am using programming to load the data and I use CellDisplayDialog but 1. The .gif doesn't animate and 2. It doesn't popup everytime I load data, pops up every 2nd or 3rd time only. If there is no way what else can I do to indicate that data is busy loading so people don't keep clicking the links.
Regards
Ruan
Hi
This is the code:
CellDisplayDialog(CELL_WAIT,cellCenter) AJAXExecuteAsynchronous(ServerProcess, Show_Groups, 1)
This is the SERVERPROCESS:
Procedure ServerProcess(nInProgress)
Multitask(0)
IF nInProgress = 10 THEN RESULT -1 ELSE RESULT nInProgress END
This is the Show_Groups Process:
Procedure Show_Groups(nInProgress)
CellCloseDialog(CELL_WAIT)
nInProgress = Val(nInProgress) + 1
AJAXExecuteAsynchronous(ServerProcess, Show_Groups, nInProgress)
Thanks
Ruan |
| |
| |
| | | |
|
| | |
| |
Posted on July, 26 2017 - 2:59 PM |
Hi
well, your code seems correct, but it looks like you have a logic problem:
You are trying to test awaiting system while calling a procedure that is so short and fast that there is nothing to wait for.
With a server code like that, and especially in test mode where the communication between client and server is local, the code of the browser procedure is called so fast that the cell is closed as soon as it is open.
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 7/26/2017 à 4:54 AM, Mister RUAN a écrit :
Fabrice Harari wrote: Hi from your post, I gather that we are talking about webdev, but we still don't know what your code is, where it is situated, if it ise ajax or not... Basically, we are far from knowing what we need to answer correctly Best regards -- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source) More information on http://www.fabriceharari.comLe 7/25/2017 à 5:51 AM, Mister RUAN a écrit : Good Day How can I display a Wait or Loading image with animation while getting > the data from my database. I am using programming to load the data and I > use CellDisplayDialog but 1. The .gif doesn't animate and 2. It doesn't > popup everytime I load data, pops up every 2nd or 3rd time only. If > there is no way what else can I do to indicate that data is busy loading > so people don't keep clicking the links. Hi This is the code: CellDisplayDialog(CELL_WAIT,cellCenter) AJAXExecuteAsynchronous(ServerProcess, Show_Groups, 1) This is the SERVERPROCESS: PROCEDURE ServerProcess(nInProgress)
Multitask(0)
IF nInProgress = 10 THEN RESULT -1 ELSE RESULT nInProgress END This is the Show_Groups Process: PROCEDURE Show_Groups(nInProgress)
CellCloseDialog(CELL_WAIT)
nInProgress = Val(nInProgress) + 1
AJAXExecuteAsynchronous(ServerProcess, Show_Groups, nInProgress) Thanks Ruan |
| |
| |
| | | |
|
| | |
| |
Posted on July, 26 2017 - 3:11 PM |
Fabrice Harari wrote:
Hi well, your code seems correct, but it looks like you have a logic problem: You are trying to test awaiting system while calling a procedure that is so short and fast that there is nothing to wait for. With a server code like that, and especially in test mode where the communication between client and server is local, the code of the browser procedure is called so fast that the cell is closed as soon as it is open. Best regards -- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source) More information on http://www.fabriceharari.comLe 7/26/2017 à 4:54 AM, Mister RUAN a écrit : Fabrice Harari wrote: Hi from your post, I gather that we are talking about webdev, but we still don't know what your code is, where it is situated, if it ise ajax or not... Basically, we are far from knowing what we need to answer correctly Best regards -- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source) More information on http://www.fabriceharari.comLe 7/25/2017 à 5:51 AM, Mister RUAN a écrit : Good Day How can I display a Wait or Loading image with animation while getting > the data from my database. I am using programming to load the data and I > use CellDisplayDialog but 1. The .gif doesn't animate and 2. It doesn't > popup everytime I load data, pops up every 2nd or 3rd time only. If > there is no way what else can I do to indicate that data is busy loading > so people don't keep clicking the links. Hi This is the code: CellDisplayDialog(CELL_WAIT,cellCenter) AJAXExecuteAsynchronous(ServerProcess, Show_Groups, 1) This is the SERVERPROCESS: Procedure ServerProcess(nInProgress)
Multitask(0)
IF nInProgress = 10 THEN RESULT -1 ELSE RESULT nInProgress END This is the Show_Groups Process: Procedure Show_Groups(nInProgress)
CellCloseDialog(CELL_WAIT)
nInProgress = Val(nInProgress) + 1
AJAXExecuteAsynchronous(ServerProcess, Show_Groups, nInProgress) Thanks Ruan
Thanks Fabrice
All good I understand but why can the .gif file not animate?
Thanks
Ruan |
| |
| |
| | | |
|
| | |
| |
Posted on July, 26 2017 - 3:22 PM |
Hi again,
> All good I understand but why can the .gif file not animate?
JS is monothread. THis means that only one thing can be done at a time, and animating a gif is one of them.
Now, in your code, you have - Display cell and gif - call (ajax) server - IMMEDIATELY execute the browser code closing the cell and gif
WHEN would the browser be able to animate anything? It is always busy either calling the server or closing the cell and gif.
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Thanks
Ruan
|
| |
| |
| | | |
|
| | | | |
| | |
|