On Sep 22, 6:55 pm, Thomas Fuchs <[EMAIL PROTECTED]> wrote:
> Consider using Prototype's readAttribute method instead. It
> automatically deals with cross-browser stupidities

readAttribute has its problems too.  Where an attribute value is
expected to be a string and has not been specified at all, IE returns
an empty string, other browsers return null.  So in IE you can't tell
whether the attribute was not specified (which should return null), or
was specified and not given a value (which should return an empty
string).

As far as I know, the only way to fix that in IE is to parse the
element's HTML to determine the correct response.

Also, when using readAttribute with the checked attribute and it has
been set, IE returns 'checked', Firefox returns an empty string.

So there are quite a few foibles that readAttribute does not deal
with.


--
Rob


--~--~---------~--~----~------------~-------~--~----~
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