Well, what I was referring to is that IE 5 flatly refuses to load a file
with a for...in loop in it, because it thinks it's a syntax error.  It
throws a js error and doesn't load the file.

I suppose you could do a try... catch around it:

try {
        document.write('<script src="prototype.js"><\/script>');
}
catch (e) {
        // this browser sucks!!
}

But I'm not sure if that will work or not.

Greg

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:rails-spinoffs-
> [EMAIL PROTECTED] On Behalf Of Sam
> Sent: Monday, June 12, 2006 11:51 AM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: RE: [Rails-spinoffs] Array.prototype.push()
> 
> >Gotcha.  If you fix it so that array.push works, it'll throw another
> >error.  I kept fixing them until I got to the 'for el in array'
error,
> >which I didn't know how to fix.  So, best not to include prototype.js
if
> >you want to support IE 5, or if you know some magic that makes the
> >For...in work, then go nuts.
> 
> I encountered one of these for/loop errors in prototype with IE 5.5.
For
> some reason, a generated Array had a length property that 5.5 couldn't
> read.
> 
> Knowing that 5.5 *shouldn't* have a problem with array length, (and
not
> knowing what internal anomaly in the array was inducing this 5.5
> behavior),
> I copied the array to a new variable, copied it back (overwriting the
> original).  The loop worked fine after that.
> 
> Sam
> 
> 
> 
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to