Forum: Ruby on Rails RJS - changing the status of radio button....

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ee0293412faca21e4ebf3326ed9d5f8c?d=identicon&s=25 Kad Kerforn (kadoudal)
on 2007-05-02 19:10
I am trying to change the checked button in a radio button array named
'prop_type' using

page << "$('prop_type[0]') = 'checked'"

got an error on the left side :  prop_type[0]...  it seems correct ...
or not ?

kad
83ca41657a99b65d99889abe712ba5e2?d=identicon&s=25 Jason Roelofs (Guest)
on 2007-05-02 19:53
(Received via mailing list)
$() is for DOM ids, not names, If you're using rails helpers, then it's
probably $('prop_type_0').

Jason
This topic is locked and can not be replied to.