Real-time database verification script

-4

I wanted to make a script , where the page appeared:

"Loading." "Loading .." "Loading ...". The 3 loadings would change constantly and when you would insert a result in banco de dados the loading would disappear and the value entered in banco de dados would appear.

How would you do such a thing with javascript in real time and php to query data of mysql ?

Thank you

    
asked by anonymous 06.10.2015 / 17:54

2 answers

1

Incited a Javascript timer with every few seconds change the example text:

<script>
var cont=0;

function nexload(){
cont++;
cont%=3;
var pontos='';
for(var i=0;i<cont;i++)
     pontos+='.';
document.getElementById('texto').innerHTML = 'Carregando'+pontos;
}

new Timer(1000,function(){nextvalue();}).start();
</script>
    
12.02.2016 / 22:25
0

You can do this using ajax and while the request is made, you can display a message on the screen to the user.

    
06.10.2015 / 18:58