For_remote_tag to update diffrent <div> depending on call re


#1

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


#2

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.