I have asked a similar question before and I know the direction is looking for javascript helper but....I''m running out of time :((( , I browse through the web, and this is the exactly thing I want to do : ( see route 1) http://www.dotnetexamples.com/Ajax/SimpleAjax.aspx (this sample has some problem though as people switching the country name to other doesn''t seem to affect the state abbreviation in this sample) can someone please kindly tell me what method should I use in rails? sammy --------------------------------- DO YOU YAHOO!? 雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
François Beausoleil
2005-Sep-15 17:34 UTC
Re: can someone pls tell me the ajax ways to do this like that?
Hi ! You need observe_field, which will observe changes to a specified DOM element. Then, you''ll need to use the :update attribute to specify which element should have it''s stuff replaced. You would usually use partials to accomplish the above. observe_field http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html#M000402 render :partial http://api.rubyonrails.com/classes/ActionController/Base.html#M000173 Bye ! François s c said the following on 2005-09-15 11:42:> I have asked a similar question before and I know the direction is > looking for javascript helper but....I''m running out of time :((( ,