Welcome! Log In Create A New Profile

Advanced

WB22 - How Would You Do This?

WB22 - How Would You Do This?
September 20, 2018 11:37AM
Hi All

I have a pretty successful web app with one page that the client literally lives on - permanently open until they knock off for the day.

Now here is the problem - controls on the page have to be refreshed depending on changes made in the database made by users on mobile apps. How would you monitor that and force the browser to refresh specific controls on a page?

Cheers
André
pao
Re: WB22 - How Would You Do This?
September 20, 2018 12:07PM
Did you try using AJAX and one TIMER in browser code?

I use this method to get the server time but probably you can do other stuff.
In the sample the call_ajax and proc_browser_ajax are local browser procedures and the proc_srv_ajax is one local server procedure

In the onload of the page: Timer(call_ajax,100)

PROCEDURE call_ajax()
AJAXExecuteAsynchronous(proc_srv_ajax,proc_browser_ajax)

PROCEDURE proc_srv_ajax()
RESULT TimeSys()

PROCEDURE proc_browser_ajax(res_srv,proc_srv)
control_time1=res_srv
control_time2=proc_srv

Regards

Paulo Oliveira



Edited 1 time(s). Last edit at 09/20/2018 01:40PM by pao.
Re: WB22 - How Would You Do This?
September 20, 2018 01:12PM
Hi André

+1 timer+ajaxexecuteasyncrhonous

I will add the use of hversion to check if a file has changed and there is a need to refresh anything

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Re: WB22 - How Would You Do This?
September 20, 2018 06:09PM
Paulo and Fabrice

Thanks for that. Not using H files though.

Cheers
André
Re: WB22 - How Would You Do This?
September 20, 2018 08:16PM
>> Not using H files though.

as you can see, once again your loss :-)

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
pao
Re: WB22 - How Would You Do This?
September 24, 2018 06:05PM
Sample page for dynamic webdev sites (WB22).
Rename it to WWH

Regards

Paulo Oliveira



Edited 2 time(s). Last edit at 09/24/2018 06:07PM by pao.
Attachments:
open | download - Page1.png (10.2 KB)
Re: WB22 - How Would You Do This?
September 26, 2018 10:03PM
Hi Fabrice

You wrote:

> as you can see, once again your loss :-)

Our projects are shared by very many languages so H files do not cut it.

Cheers
André
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: