If only I could get 'observe_field' to fire?

I’ve been programming in Rails for about a year and have made great
progress. If I could just fire an event inside a form and respond with
code, I could go much further.
I’ve created an example using the observe_field javascript applet and
can’t get it to respond. Here’s a very simple example where the user
is selecting from a SELECT statement and once this hurdle is jumped
the observe_field should fire by showing all the params.

Category:
<% @ecats.each do |ecat| %> > <%= ecat.description %> <% end %>

<%= observe_field “ecat_id”,
:update => ‘params.inspect’ %>
I don’t seem to be getting the consolidated list of this forum anymore
and would appreciate a reply to my email address below.
Thank you,
Kathleen
[email protected]

On 8/29/07, [email protected] [email protected] wrote:

<% @ecats.each do |ecat| %>
<option value="<%= ecat.id %>"
<%= ’ selected’ if ecat.id == @eitem.ecat_id %>>
<%= ecat.description %>

<% end %>

<%= observe_field “ecat_id”,
:update => ‘params.inspect’ %>

You haven’t given a :url or :function option. One or the other is
required.

In a situation like this, always look at the generated JavaScript to
make sure it’s generating what you expect. Also, use Firebug so you
can trace XHR and see if it fires and if any errors are returned.

I don’t seem to be getting the consolidated list of this forum anymore
and would appreciate a reply to my email address below.

Um, no.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs