I am attempting to create a loading bar in javascript
here is my code:
function load(barsize){
parseInt(barsize);
var loadingbar = '';
for(i = 1; i<=barsize;i++){
loadingbar += '<div style="width:5px; height: 5px; float:left;background-color:green;"></div>'
}
document.getElementById('loadingbar').innerHTML = loadingbar;
if(barsize < 80){
barsize++;
timeout = window.setTimeout('load('+barsize+')', 100);
}
}
The debugger is saying "Uncaught ReferenceError: load is not defined" after doing nothing with the statement:
timeout = window.setTimeout('load('+barsize+')', 100);