SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    NC
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    form_remote_tag not displaying button

    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


    <% 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

    <%= javascript_include_tag :defaults %>

    Any ideas why the button wouldn't show up?

    Thanks,
    Clem
    Edit/Delete Message

  2. #2
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    View the source of the resulting HTML. Then read this: http://railsmanual.com/module/Action...orm_remote_tag

    You should be able to find out what the problem is, but ask if you aren't.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •