So, I have this form/datagrid thing. I want to have a button that
clears the fields (not a reset, which would set them to the default
state, I want them blank.) For various reasons, getByClassName seemed
the best way to deal with this.

Everything was fine on Moz/Firefox. Safari seems fine. But IE...

Some detective work later, it seems that the problem is caused by
*another* field on the page. (With it, problems; without it, no
problems.) More detective work suggests that the problem is the field's
name ("length").

More precisely, it seems getElementsByClassName in IE (6 and 7, at
least) will fail to gather elements (returns zero-length array) if
there is an input on the page with 'name="length"'.

Solutions: Change the name of the input, or use the optional parent
argument to avoid it.

More: Looking at the getElementsByClassName declaration in
prototype.js, I'd guess this is really a problem with $A or
getElementsByTagName, but that's as far as I got.

Demo: http://www.thewehners.net/joshua/test_ie_length.html


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to