On Jan 8, 5:23 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Any chance you can post a test page somewhere? It's a little hard to
> picture what's going on.
Here's a strip down rendition of exactly what I'm doing:
function Mica() {
this.tally = 18;
this.types = ['htm', 'txt', 'xml', 'gif', 'jpg', 'png'];
this.sizes = ['sm', 'md', 'lg'];
};
Mica.prototype.start = function() {
var mica = this;
$("#meter").attr("src","img/meter_on.gif").show("fast", function()
{
mica.load_files();
});
};
Mica.prototype.load_files = function() {
for(var i=0; i < this.types.length; i++) {
ftype = this.types[i];
for(var j=0; j < this.sizes.length; j++) {
fsize = this.sizes[j]
fname = "data/" + ftype + "/" + fsize + "." + ftype;
this.load_up(fname, ftype, fsize);
};
};
};
Mica.prototype.load_up = function(fname, ftype, fsize) {
var mica = this;
$.ajax({
url: fname,
cache: false,
async: false,
complete: function() {
mica.tally--;
if (mica.tally == 0) {
$("#meter").attr("src","img/meter_off.gif");
}
}
});
};
T.