Created
June 28, 2013 19:39
-
-
Save fndiaz/5887467 to your computer and use it in GitHub Desktop.
loop ajax jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function(){ | |
function poll() { | |
$.ajax({ | |
method: "get", | |
url: "initial/gera_zip", | |
dataType: "json", | |
success: function(lista){ | |
for(var i=0, l=lista.length; i<l; i++){ | |
var fila = lista[i]; | |
alert(fila); | |
for(var j=0, k=fila.length; j<k; j++){ | |
alert(fila[j]); | |
} | |
} | |
} | |
}); | |
} | |
setInterval(poll, 500); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment