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.


Mark Reginald James wrote:
> Allen Walker wrote:
>> 
>>           page[:balance_div].hide
>>         else
>>           page[:balance_div].show
>>         end
>>       end
>>     end
>>   end
> 
> One way is to add the following below balance_div:
> 
> <%= javascript_tag "$('guarantee_status').onchange()" %>
> 
> Another would be to only render display:none into the
> div tag if the condition is met.
> 
> The first method is preferred because when a page is
> refreshed in Firefox it does not reset form entries,
> but your app is still called as a simple GET, so the
> div may be inappropriately made visible or hidden.
> 
> --
> Rails Wheels - Find Plugins, List & Sell Plugins - 
> http://railswheels.com

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