As a newcomer to Grails and AJAX, I find myself struggling to understand the concept of AJAX with limited resources online.
My current understanding is that in Grails, if I want to trigger a method in one of my controllers when a specific part of my HTML document loads, I can use something like this:
<div onload="${remoteFunction(action:"foo", update:"foo"...)}" ...>
- How does the response from the "foo" function call get returned, and how can I access it in a JavaScript function?
- Is it possible to return an object from a custom class in the "foo" action?