Skip to content

Instantly share code, notes, and snippets.

@ivarprudnikov
Created July 1, 2013 08:35
Show Gist options
  • Save ivarprudnikov/5899280 to your computer and use it in GitHub Desktop.
Save ivarprudnikov/5899280 to your computer and use it in GitHub Desktop.
Example of grails form remote and onLoading event
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main"/>
<title>Homepage</title>
</head>
<body>
<g:formRemote dojoType="dijit.form.Form" method="post"
onLoading="myFunction()" id="submitForm" update="resultset"
name="formRemote" url="[ controller: 'main', action:'index' ]">
<input type="text" name="x">
</g:formRemote>
<div id="resultset"></div>
<g:javascript>
myFunction = function() {
alert("test 123 test");
}
</g:javascript>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment