This particular error will crop up on IE if you have not explicitly
"extended" the object you're calling a Prototype method on. If you use
the normal Prototype "finder" methods, then any element returned will
always be extended (have all of the Prototype methods added into it).
And on normal browsers, once you extend one element, you've extended
all of them, because of how prototype (little p) works in JavaScript.
But IE doesn't follow those rules explicitly, so each element has to
be extended before it can be operated on.
Rough example:
[1,2,3].each(function(n){ $('someDiv').insert(n + 2); });
will output 345 in your DIV in any browser other than IE.
$A([1,2,3]).each ... etc.
will do it everywhere.
Walter
On Aug 26, 2011, at 11:51 AM, Luke wrote:
Hi
I'm trying to get a project I'm working on IE7-proof and I'm running
into errors right from the start. The project is almost finished so
I'm already including a lot of scripts and already have a lot of
markup. When I load my page I get the error
Object doesn't support this property or method. prototype.js line
291 character 7
...and lot's of others, but this one occurs in prototype.js pretty
much is the basis for everything else. All scripts depend on one
call in a "dom:loaded"-observer to be exectuted. I commented that
line out so nothing get's executed but I still get the error in
prototype.js. And I have no idea where to start. Fermion in the IRC-
channel told my prototype doesn't work in quirksmode in IE7. I'm
using XHTML 1.0 Transitional and I get validation-errors because I
use custom attributes in some tags. But I created a file that uses
Prototype and has custom attributes for testing pruposes and that
page works well.
If someone has an idea or a tip it's very appreciated.
Thanks and have a nice weekend,
Lukas
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/dxQftnqYLjoJ
.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com
.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.