I'm pretty new to ajax.
I try to load some data with Ajax and PHP. That basically works without any problems, but there is always a refresh bar when the Ajax updates are executed (in Firefox, Chrome).
The page isn't really refreshing entirely but every two seconds a refresh bar appears (and that gets really annoying): http://i.stack.imgur.com/IZ5XY.png
Code:
main.js:
window.onload = function onLoad() {
setInterval("reload()",2000);
};
.
.
.
function reload() {
$.ajax({
type: "GET",
url: "script.php",
success: function(msg){
$("#test").text("txt");
}
});
}
The php Script just echos some txt!
Every help is appricated, Thank You! Kind Regards