selva
#1
Hi I am using radio botton,I am struggling to use options…following is
my code…
<%=
radio_button(‘community’,‘default’,0,options={:checked,:onClick=>“javascript:set_default(this);”})%>
If i am using without checked option its working fine.If i use that its
throwing error…
Please help me
selva
#2
You don’t need the “options=”. That is just in the method definition to
let you know that the final argument is defaulted to an empty hash.
radio_button(‘community’,‘default’,0,{:checked,:onClick=>“javascript:set_default(this);”})
Selvaraj S. wrote:
–
Sincerely,
William P.
selva
#3
One more thing I noticed. You need to supply a value for the :checked
key like :checked => true
radio_button(‘community’,‘default’,0,{:checked => true,:onClick =>
“javascript:set_default(this);”})
William P. wrote:
my code…
–
Sincerely,
William P.