Kleber Shimabuku wrote in post #1015905:
>
> and the form
>
> <p class="fields">
>   <%= f.collection_select(:part_id, @parts, :id, :title, { :prompt =>
> true } , { :onchange => "load_part_price_select(this.id,
> this.options[this.selectedIndex].value);"  } ) %>
>   <%= f.label(:part_id, "Price: ") %>
>   <span class="price"></span>
>   <%= f.hidden_field :_destroy %>
>   <%= link_to_remove_fields "remove", f %>
> </p>
>

js shouldn't be in your html, i.e. this:

{ :onchange => "load_part_price_select(this.id,
> this.options[this.selectedIndex].value);"

should be done up in the <head> section of your html.  In order to do 
that, you have to put your js inside a function that executes after the 
page has loaded.

-- 
Posted via http://www.ruby-forum.com/.

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

Reply via email to