java - auto reload content of a postgreSQL table -


i using code:

my code

to output table. question how possible updating in page without reloading?

thank you

either use ajax requests or if feel good, try html5 websockets : add trigger table update / insert / delete, , keep clients up-to-date.

ajax means you'll doing request client server every few seconds, check if have changed , if so, you'll download new data (usually devs use json), , update table using javascript data.

with websockets, event starts server side : whenever db table updated, send request server clients tell them update table new data.

you'll find plenty of examples on web, searching either ajax or websockets.

if don't know are, i'd recommend go ajax, setting-up websockets server php might tricky.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -