Hi. I have managed to figure out how to use AJAX to pull in the information from my progress.json file and use that information to set the value of the progress indicator… but when I try to wrap it in a setInterval() function, I keep getting:
Error: missing ] after element list
Line: 19, Column: 8
Source Code:
[object XMLHttpRequest]
Here is my code:
[code=php]
<!DOCTYPE html>
<html>
<head>
<link href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css” rel=”stylesheet” type=”text/css”/>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js”></script>
<script src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js”></script>
</head>
<body>
<div id=”progressbar”></div>
<script>
setTimeout(
$.getJSON(“http://whitebox.local/progress.json”,
function(data){
$(“#progressbar”).progressbar({ value: data.progress });
})
,1000)
</script>
</body>
</html>
Now, this works just fine by itself (without the setTimeout() wrapper):
[code=php]
$.getJSON(“http://whitebox.local/progress.json”,
function(data){
$(“#progressbar”).progressbar({ value: data.progress });
})
Any assistance would be greatly appreciated.