I read a question and this was the answer:
You can read about Jquery Ajax from official jquery Site:
Site Link - >https://api.jquery.com/jQuery.ajax/
If you don't want to use any click event then you can set timer for periodically update.
Below code may be help you just example.
function update() { $.get("response.php", function(data) { $("#some_div").html(data); window.setTimeout(update, 10000); }); }
Above function will call after every 10 seconds and get content from response.php and update in #some_div...
Now I am making a chat website. Simple. But if let's say there have been 200 msgs sent from the beginning of the conversation. If I renew the whole of the chat data everytime, it will have to write the 200 msgs again and will then write the 1 new msg i.e. the two hundred and first message. What I mean is that I want only the not-already-present data to be UPDATED not INSERTED.. :) hope you get what I mean. And plus, in all the questions they either used a $.get request or a load() function of jquery writing the path to a mysterious php file but never telling what on earth is in the php file :) plus, please don't block me for seeking help as I was last time :'( It was heart-breaking really to be kicked off such an awesome community :)