[prototype] Element.readAttribute in js.rjs

I am trying to test the ‘type’ attribute’ of some elements in my
page , but I don’t get it right,

writing the following code in my .rj.rjs file

page.select(’#user-list input’).each do |e|
t = e.readAttribute(‘type’)

just displays :

[object HTMLInputElement]

I’m wrong , sure, but why ?

thanks for your suggestions


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs