Why is it that <%= link_to_remote "add round", :url => { :action => :add_round }, :class => "blueL", :update => "rounds", :method => "put" %> works while <%= submit_to_remote 'name', "add round", :url => { :action => :add_round }, :html => { :class => "blueL" }, :update => "rounds", :method => "put" %> does not?
Is your submit_to_remote in a form ? it won't work if it's not (since what it does is submit its form to the specified URL)
Fred
No... So I _must_ use link_to? Cause I don't see a button to remote.
No... So I _must_ use link_to? Cause I don't see a button to remote.
There's always button_to_function('Foo', remote_function(...)). Or
style the link to look like a button.
Fred
edberner wrote:
Why is it that <%= link_to_remote "add round", :url => { :action => :add_round }, :class => "blueL", :update => "rounds", :method => "put" %> works while <%= submit_to_remote 'name', "add round", :url => { :action => :add_round }, :html => { :class => "blueL" }, :update => "rounds", :method => "put" %> does not?
What do you mean by "doesn't work"?
Got an error message?
It's just not functional. I want it to render a partial in the rounds
id, while adding the models to the database.
Ellis Berner wrote:
It's just not functional.
Hmm... gonna need more information than that.
1. Have you checked your development log? 2. Do you have the Firebug extension for Firefox to look at the content of the Ajax request? 3. Did you include the correct JavaScript files?