Wait for signal from server or mysql
Hi.
Is it possible that with the help of Jquery wait for the change in the database, and then gives an overview in a div (for example <div class="result"></div>) but with no permanent refresh div's for every "n" seconds
If this possible, can you show me an example or explain how to do it?
PS:
to be more precise
I want to just after the entry of a new row in the database, in diva result, added a new value that contains this(new row values in the database), but without constant refresh of the same div
for now, i know how to get data from mysql, and put in specific div like in this code
- $('input#name-submit').on('click', function(){
- var name = $('input#name').val();
-
- if($.trim(name) != ''){
- $.post('ajax/name.php', {name: name},function(data){
- $('div#name-data').text(data);
- });
- }
- });
This i needed in order to create admin panel in which i can follow live, what users are entered into the database.