I have run into an issue similar to this, where a page loads with a
value set inside the elements markup, then JS later modified the
obj.value property, when the value property was read again by using
getAttribute it wasn't what the JS had set it to, it can be very
tricky at times.
Based on what you've written, I would assume FF allows you to set the
disabled property w/o a value, where as IE is forcing it to say
"disabled = disabled" and then the third case is where it is not set,
where you get NULL. So with that in mind you could write an easy
enough conditional to get by w/o having a whitelist of values to
accept.
if(ele.readAttribute("disabled"))
doSomething();
http://prototypejs.org/api/element#method-readattribute
On May 5, 9:21 am, crashmeister <[EMAIL PROTECTED]> wrote:
> Can someone please let me know how to get consistent values from:
>
> var w = $(myElement).readAttribute("disabled");
>
> I am getting : null, " ", "disabled" depending on IE or FF.
>
> I thought Prototype (1.6) was supposed to fix this ?
>
> Thanks,
> Crash.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---