Hello everyone, I'm new to Ruby on Rails and I'm using the book Rails
Solutions: Ruby on Rails Made Easy as my reference. I'm now in Chapter
8 where it touches the application of AJAX to Rails application.
However, the code didn't work and when I checked the browser. It
returned an error message of "${element} has no properties".
This is the code snippet that I followed:
<p id="add_link"><%= link_to_function("Add a category",
"Element.remove('add_link');Element.show('add_category')")%></p>
<div id="add_category" style="display:none;">
<%= form_remote_tag(:url => {:action => 'new'},➥
:update => "category_list", :position => :bottom,➥
RAILS SOLUTIONS: RAILS MADE EASY
132
:html => {:id => 'category_form'})%>
Name: <%= text_field "category", "name" %>
<%= submit_tag 'Add' %>
<%= end_form_tag %
By the way, I'm using Rails 2.0.2
Any advice?
Thank in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---