olivier Hericord
2005-Dec-21 21:37 UTC
for_remote_tag to update diffrent <div> depending on call result ....
hi, is there a way to use form_remote_tag to update one div or an other depending on the call result...??? perhaps with evaluate_remote_response but can''t get it to work. help thanks olivier
Mark Reginald James
2005-Dec-21 22:14 UTC
Re: for_remote_tag to update diffrent <div> depending on call result ....
olivier Hericord wrote:> is there a way to use form_remote_tag to update one div or an other > depending on the call result...??? > > perhaps with evaluate_remote_response but can''t get it to work.Yes, either use evaluate_remote_response, or the full form of the :update option to form_remote_tag, returning the appropriate response code from the controller. :update => { :success => ''div_ok'', :failure => ''div_error'' } render :text => ''Completed Sucessfully'' render :text => ''Processing error'', :status => 500 -- We develop, watch us RoR, in numbers too big to ignore.