javascript – How to create and populate a table using jquery and database?


I need to create a table in HTML that populates the rows and columns with data coming from a specific table in my database. But I want that whenever new data is inserted in this database table, it automatically appears to the user in the HTML table. This is all without doing the entire page load again.

I'm already using Java, JavaScript, jQuery and HTML in my project. Is there any way to do this with jQuery? If not, any ideas that meet this need are welcome.


Well for what you describe exergo 2 steps that are necessary.

  • I believe that a solution would be for you to make a service to receive the information since it is a database, so the method would return this data and you would just make the Javascript with jQuery to consume the service.
  • About updating the fields, well you need to use a pattern that, if I remember correctly, is the OBSERVER. From x to x time it queries the method and changes if it has content.

I found this example on stackoverflow in English:

Hope this helps

Scroll to Top