Best way to refresh data on a web page

For general Flowcode discussion that does not belong in the other sections.
Post Reply
RGV250
Posts: 264
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 23 times
Been thanked: 30 times

Best way to refresh data on a web page

Post by RGV250 »

Hi,
I am pretty new (read hopeless) at web pages but have managed to read arrays (integer & floats) from Flowcode to an external page.
The issue I have is that the page gets redrawn everytime I refresh it which looks bad. I have spent ages looking at books and scouring the internet for a better way, I found XMLHttpRequest (using Javascript and Ajax) but cannot get this to work. It may be how I am trying to do it but then I was told JQuery might work so looking into that.
Does anyone have any experience with this who could point me in the right direction.

Bob

RGV250
Posts: 264
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 23 times
Been thanked: 30 times

Re: Best way to refresh data on a web page

Post by RGV250 »

Hi,
Pretty much failed miserably on this, I have just noticed for version 10 it shows Web based applications *coming soon. Any idea when soon will be as that might be able to help.

Bob

Steve-Matrix
Matrix Staff
Posts: 1257
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 168 times
Been thanked: 279 times

Re: Best way to refresh data on a web page

Post by Steve-Matrix »

We have no date for this addition yet, but I hope we will have something within 3-4 months.

DavidA
Site Admin
Posts: 25
Joined: Wed Aug 05, 2020 10:07 am
Been thanked: 3 times

Re: Best way to refresh data on a web page

Post by DavidA »

Hi, you will want to use asynchronous javascript. Probably AJAX is the easiest way to accomplish this.

https://www.w3schools.com/xml/ajax_intro.asp

Is a good intro to using AJAX.

RGV250
Posts: 264
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 23 times
Been thanked: 30 times

Re: Best way to refresh data on a web page

Post by RGV250 »

Hi David,
I did try XMLHTTPRequest as in post 1 but the problem is I have not got much idea on what I need to do. I have not got the files on this PC so i can't post what I have tried which is probably no use anyway.
Looking at the documentation it needs a file to fetch so I wondered if I should forget about the outgoing substitutions and use a CSV file or something. Or if it is possible to read the actual %xx variables with the HTTPRequest.

Regards,
Bob

DavidA
Site Admin
Posts: 25
Joined: Wed Aug 05, 2020 10:07 am
Been thanked: 3 times

Re: Best way to refresh data on a web page

Post by DavidA »

Depends on your implementation, you could always write what you want the site to read to a file and have the XML request pull that file through and write the data to the page.

Post Reply