Question

websocket / sse are used to send data to client browser. Online stock quotes, or twitters updating timeline or feed are examples of it.

I have a page ( see image ) that ( should ) show data ( sql ) from server to browser ( page ).

when a button is clicked ( like a left/right arrow click, as seen in image ) it should show ( refresh ) new data. Will websocket be suitable for such a need.

If not then what should I use. Since i am using python will a web python framework ( cherrypy, flask ) be handy.

Am i thinking in proper direction ( considering I am relatively new to this )

visualisation of report

Was it helpful?

Solution

You don´t need websockets to load data to a webpage dynamically. Instead, you can use jQuery´s .load() method to load a page and put it into a div. Here´s an example from jquery.org:

$( "#result" ).load( "ajax/test.html", function() {
alert( "Load was performed." );
});

And here´s the jQuery help page for the .load() method: http://api.jquery.com/load/.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top