Grails button to call controller within a page -
my gsp has button , not submitting form. when clicking button, want call n action in controller , @ same time have jquery code attached button. after calling action in controller, hope stays in same view(not redirected page related action).
any suggestion button? g:link, input button not seem fit.
action want call "myaction" , controller has 'myaction' "mycontroller". in advance.
g:remotelink best solution problem dude, call call jquery or javascript function upon success of action, here addedcart javascript function ,after action gets executed successfully
<g:remotelink action="remotecart" onsuccess="addedcart()" id="${product.id}"> <img src="<g:resource dir="images" file="cart.gif"/> " rel="#mies1"/> </g:remotelink> ref : grails doc
Comments
Post a Comment