Created
August 13, 2009 15:33
-
-
Save jakearchibald/167239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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