PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → Display Wait Message While Loading
Display Wait Message While Loading
Débuté par Mister RUAN, 25 juil. 2017 13:51 - 5 réponses
Membre enregistré
208 messages
Popularité : +1 (1 vote)
Posté le 25 juillet 2017 - 13:51
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
Posté le 25 juillet 2017 - 14:21
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
Posté le 26 juillet 2017 - 12:54
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.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


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
Posté le 26 juillet 2017 - 14:59
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.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

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
Posté le 26 juillet 2017 - 15:11
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.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.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

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
Posté le 26 juillet 2017 - 15:22
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