views:

18

answers:

1

Hi

I used the Prototype library in an app mostly because its "cross-browsers" features. My fear was that everything would work fine in Firefox but crashed on IE. But for my surprise, this line of code crash (and in a very disgusting way) on Google Chrome:

   $('mensajes').update("");

With the message: "TypeError: Cannot set property 'innerHTML' of null

'mensajes' exist, and this code works perfectly in Firefox and Internet Explorer

Any clue???

PD: I discovered that also problems happens with hide(), and I suspect that other methods may be problematic too.

Is Chrome the buggier, or Prototype?? Thanks in advance

A: 

Just use innerHTML

$('mensajes').innerHTML = '';

I only use .update() in rare cases because of all the overhead (checking for scripts to run etc)

Post I did about this a while back http://practical-prototype.blogspot.com/2008/03/when-to-use-prototypes-features-and.html

jminkler
but this isn't incompatible with IE??
Nisanio