Page 1 of 1

Best way to refresh data on a web page

Posted: Tue Feb 21, 2023 3:15 pm
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

Re: Best way to refresh data on a web page

Posted: Fri Apr 21, 2023 6:22 pm
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

Re: Best way to refresh data on a web page

Posted: Mon Apr 24, 2023 8:38 am
by Steve-Matrix
We have no date for this addition yet, but I hope we will have something within 3-4 months.

Re: Best way to refresh data on a web page

Posted: Mon Apr 24, 2023 3:25 pm
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.

Re: Best way to refresh data on a web page

Posted: Tue Apr 25, 2023 9:45 pm
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

Re: Best way to refresh data on a web page

Posted: Thu Apr 27, 2023 3:20 pm
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.