Allen Walker wrote:
> Doesn't work. I tried putting the javascript_tag right after the div and 
> outside the form itself. I understand the logic in the code but for some 
> reason the onchange event is not causing the "change_status" to get 
> fired. I even checked the development.log and change_status is not 
> getting called.

OK, try this:

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

using the following helper:

   def javascript_onload(js)
     javascript_tag <<-END
       olf = function() { #{js} };
       if (document.addEventListener)
         window.addEventListener("load", olf, false);
       else
         window.attachEvent("onload", olf);
     END
   end

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