# RJS - changing the status of radio button

**URL:** <https://www.ruby-forum.com/t/rjs-changing-the-status-of-radio-button/103180>\
**Category:** Rails\
**Created:** [May 2, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/rjs-changing-the-status-of-radio-button/103180 "2007-05-02T19:10:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 2, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/rjs-changing-the-status-of-radio-button/103180/1 "2007-05-02T19:10:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 2, 2007, 7:53pm UTC](https://www.ruby-forum.com/t/rjs-changing-the-status-of-radio-button/103180/2 "2007-05-02T19:53:58Z")

</div>

$() is for DOM ids, not names, If you’re using rails helpers, then it’s  
probably $(‘prop\_type\_0’).

Jason
