Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getProgress(){
- $.ajax({
- url: 'bar.php',
- success: function(data) {
- var localo = JSON.parse(data);
- if(localo.speed_refresh!='done'){
- $('#current_bar').html('<pre>'+localo.current_bar+'</pre>');
- $('#current_hotel').html(localo.current_hotel);
- getProgress();
- }
- }
- });
- }
- function re(vars){
- if(!vars){
- $("html, body").animate({ scrollTop: 0 }, "slow");
- }
- $f = vars;
- $.ajax({
- url: "process.php",
- data: $f,
- type: "GET",
- success: function( json ) {
- var local = JSON.parse(json);
- $( "#totals_bar" ).html( '<pre>'+local.totals_bar +'</pre>');
- $( "#totals_hotel" ).html( local.totals_hotel );//cik kur atrasti
- if(local.speed_refresh!='done'){
- re(local.stage);
- if(!vars){
- getProgress();
- }
- }else{
- alert('viss padarīts! \n\n ');
- }
- },
- error: function( xhr, status, errorThrown ) {
- alert( "Sorry, there was a problem!" );
- console.log( "Error: " + errorThrown );
- console.log( "Status: " + status );
- console.dir( xhr );
- },
- complete: function( json ) {
- }
- });
- }
- <input type="submit" onclick="re('');" name="sakums" value="AIZIET!">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement