Skip to content

Instantly share code, notes, and snippets.

@jakearchibald
Created August 13, 2009 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakearchibald/167239 to your computer and use it in GitHub Desktop.
Save jakearchibald/167239 to your computer and use it in GitHub Desktop.
glow.events.addListener("#yourForm", "submit", function() {
glow.net.post(
// make a request to the place the form posts to
this.action,
// get the data from the form to send to the server
glow.dom.get(this).val(),
{
onLoad: function(response) {
// response.text() is the response from the server
}
}
);
// this next line stops the form submitting, as you've already sent the data yourself
return false;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment