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
Post a Comment