Hola Amigos tengo una duda aver si alguien me la puede resolver:
tengo el siguiente código que carga dos funciones diferentes de window.onload
Código HTML:
<script src="progressbar.js" type="text/javascript"></script>
<script type="text/javascript">
function makeDoubleDelegate(function1, function2) {
return initialize() {
if (function1)
function1();
if (function2)
initialize_a();
}
}
</script>
Mi duda es como hacer que a su vez, cuando me cargue "initialize_a" lo haga desde otro archivo js que se llama progressbar1.js
el código de progressbar.js
Código HTML:
function initialize() {
divId = 'sample';
thedivId = document.getElementById(divId);
var percentage = thedivId.innerHTML;
thedivId.style.backgroundColor="#BF5852";
brim(divId,0,parseInt(percentage.substr(0, percentage.length-1)));
}
function setWidth(o, start) {
o.style.width = start+"%";
}
function brim(Id,start,percentage) {
if (document.getElementById) {
o = document.getElementById(Id);
if (start <= percentage) {
setWidth(o, start);
start += 1;
document.getElementById('percentage').innerHTML = (start -1) + "%";
window.setTimeout("brim('"+Id+"',"+start+","+percentage+")", 50);
}
}
}
y el progressbar1.js es idéntico pero las ID = "sample, percentatge" se llaman "sample1 y percentatge1, probé poner el código de progressbar1.js seguido en el código de progressbar.js pero no funcionó.
Muchas gracias.
Si a alguien le interesa el tema de progress bar lo he sacado de aquí, lo que passa que yo necesito incluir muchas progress bar en mi web.
http://www.jcargoo.org/2008/12/creat...g-css-and.html