This is my code...
HTML & JS:
<div style="margin:20px 0;">
<a href="#" class="easyui-linkbutton" onclick="start()">Start</a>
</div>
<div id="pb" class="easyui-progressbar" style="width:400px;"></div>
<script>
function start(){
$.ajax({
async:true,
type:"POST",
url: '_modul/mod_bengkel/aksi_bengkel.php',
success: function(result) {
var hasil=parseInt(result)+0;
var value = $('#pb').progressbar('getValue');
if(value < 100) {
value += hasil * 10;
$('#pb').progressbar('setValue', value);
}
}
});
};
</script>
And this is my PHP file
for ($x = 1; $x <= 100; $x++) {
if($x>1) sleep(2);
echo $x;
}
When I click start, it's nothing happen...
I need your advise how to fix it....
Please....