
December 20th, 2006, 06:56 PM
|
|
Contributing User
|
|
Join Date: Mar 2003
Posts: 174
Time spent in forums: 14 h 27 m 11 sec
Reputation Power: 11
|
|
Ok Problem solved - it must be just the version of rails I was running:
this the the version that worked for me:
Code:
<%= form_remote_tag :url => { :action => :add_to_cart, :id => product }
%>
<%= submit_tag "Add to Cart" %>
<%= end_form_tag %>
Quote: | Originally Posted by CLEM_C_ROCK Hello - I'm trying to use a form_remote_tag to make a submit button to fire off an Ajax call. When I add this form_remote_tag code I don't see a submit button where there should be one.
I'm following the example given in the Agile Web Development book starting on page 122.
The code I'm using as follows
Code:
<% form_remote_tag :url => { :action => :add_to_cart, :id => product } do %>
<%= submit_tag "Add to Cart" %>
<% end %>
I also have enabled the javascript_include_tag :defaults like this
Code:
<%= javascript_include_tag :defaults %>
Any ideas why the button wouldn't show up?
Thanks,
Clem
Edit/Delete Message |
|