Allen Walker wrote:
> No such luck again. Here's the generated HTML:

Looking at the Prototype code, observe only calls
the function if the value has actually changed.

So one way would be to move the observer inline:

:onchange => remote_function(:url => ...)

Or in this case it would be faster & simpler to keep
everything client-side:

function display_balance(gstatus) {
   if (gstatus == '' || gstatus == 'Due')
     $("balance_div").hide();
    else
      $("balance_div").show();
}

:onchange => 'display_balance(value)'

<%= javascript_tag "$('guarantee_status').onchange()" %>

-- 
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.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