hi people
I don't know much about ajax - jquery. And right now I need to use
some functionality with them.
In a form (sales model) I have the following code:
<div>
<%= f.label :product_id, "Product" %>
<%= f.collection_select( :product_id, Product.all, :id, :name,
options={} ) %>
</div>
<div>
<%= f.label :price, "Price" %>
<%= f.text_field :price %>
</div>
The idea is: when I select a "product" I want to show the price of
that product automatically in the "price" text-field. I have a table
where I store the price of each product.
I tried this example but didn't work
http://www.webmonkey.com/2010/02/building_with_ajax_and_rails/
Hope you can help me, thanks
--
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 [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-talk?hl=en.