Automatically updating web page

by  |  01-Sep-2019 08:06

You will need to create 2 files: (or name it whatever you like, just be sure to change the file name in the Java Script section also). It does this by using a GET (a computers way of grabbing a file/value) to the “reload.txt” file.The value within this file is then updated to the HTML element with an ID of “guwii Favourite Number”.The web has a wonderful ability to be dynamic, this is the way it should be.

automatically updating web page-6

However, you can't use the method described in that article to solve this problem.

That method requires that you identify all JSF components and write them into your JSF pages.

For that you need a server based on protocol like Comet.

Check this project for more information In your case, if you/your company can afford it, I'd recommend Wt.

To test it, just save something different (or in keeping with our example, your ever-changing favourite number) in and wait 10 seconds to see it change (or just change 10000 in the set Interval to 1000 to make it update every second!

Community Discussion