Re:(RESOLVED, KIND OF) auto complete and after update elemen

Well, I did finally get the after_update_element to call my controller
action with the following syntax:

<%= text_field_with_auto_complete ( :customer, :company_name, { :size =>
“45” }, :after_update_element => “function(element,value){” +
remote_function( :url => {
=> :get_customer_info }, :with =>

  • “}” ) %>

It finds the correct customer in the database, and then in the action I
rendering a template that consists of several javascript element updates
similar to the following:

document.getElementById(“po_customer_address”).value = ‘<%=
@found_customer.address %>’;

However, although this template is getting called (per the log files),
information that is found in the database in not getting updated via the
template parsing.

The frustrating part is this worked when I had the company names as
and used observe fields.
I switched becuase there are several thousand records of customers and
was one huge select box.
Allowing the user to type made more sense.
However, now the information isn’t getting updated now, so maybe it
such a bad thing to have huge select boxes :wink:

Anyone have any idea why now the parsing of this template doesn’t update
information in the view page?

Thanks in advance,