ajax - Is there any way to update div according to failure and success of form remote in grails? -


i using form remote submit form. if data saved means want update list div. if failed means want refresh error div. there options in formremote of grails ?

yes, formremote have options onfailure, onsuccess , oncomplete.

<g:formremote name="savedata" url="[controller: 'book', action: 'byauthor']" oncomplete="jquery('#completedivid').html(data)" onsuccess="jquery('#successdivid').html(data)" onfailure="jquery('#failuredivid').html(data)">     ... </g:formremote> 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -