Hi:
I''ve changed this now going to a simpler example, but it''s
still not
working - I can''t catch the onclick in the radio button:
<%= radio_button_tag "one-time", 1, checked = false, options
{:onclick => "#{<%= link_to_function("One-Time Goal", nil,
:id =>
"onetime") do |page|
page.replace_html("goaltype" , :partial =>
"g_onetime", :object =>
f) end %>}"} %><br>
Now I''m getting a syntax error.
This seems like the best way to do this but i''m getting tripped up
becuase of syntax.
Thanks so much in advance!
Mike
On Jan 19, 1:26 pm, "Miked"
<mike.dershow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi:
>
> I have aradio_button_tagI''d like to catch the "onclick"
action for as
> you would in HTML. When this happens, there is a simple DIV tag that I
> want to appear (probably through my RJS and "form_remote_tag".
I''m a
> bit of a newbie and getting lost in this. here''s what I have:
>
> from view:
> <% form_remote_tag :url => { :action => :goaltype } do %>
> <%=radio_button_tag"one-time", "one-time
goal", checked = false %>
> <% end %>
>
> RJS:
> page.replace_html("onetime" , :partial =>
"g_onetime")
>
> Partial to appear when radio button is clicked is just another form :
>
> My controller method "goaltype" is empty because there''s
nothing I
> really need to do, or do I?
>
> Thanks so much in advance for your help!
>
> Mike
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---