Vasu Re
2007-Oct-18 18:11 UTC
how to assign a id dinamically to checkbox created dinamical
hi -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Vasu Re
2007-Oct-18 18:19 UTC
Re: how to assign a id dinamically to checkbox created dinamical
Vasu Re wrote:> hiit got sumbmitted before writing Q:), ok so iam using <%= check_box_tag ( "id","word",false, :onclick => remote_function( ))%> for sending remotecall but i want "id" and value ie "word" to be diff as i load like iam looping through records as shown below <%for x in @xrecords%> <%= check_box_tag ( "<%x.id%>","word",false, :onclick => remote_function( ))%> <%end%> but this is not taking <%x.id%> but throwing exception,please let me know if there is a way to do this ie assigning the id dinamically as i loop -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robin Fisher
2007-Oct-19 12:12 UTC
Re: how to assign a id dinamically to checkbox created dinamical
> <%for x in @xrecords%> > <%= check_box_tag ( "<%x.id%>","word",false, :onclick => > remote_function( ))%> > <%end%> > but this is not taking <%x.id%> but throwing exception,please let me > know if there is a way to do this ie assigning the id dinamically as i > loopHi Vasu, You need to be putting x.id within curly brackets so that it reads: <%= check_box_tag ( "#{x.id}","word",false, :onclick =>> remote_function( ))%>That should stop the exception. Kind Regards Robin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---