Skip to content

Instantly share code, notes, and snippets.

@sahid
Created July 12, 2010 09:59
Show Gist options
  • Save sahid/472317 to your computer and use it in GitHub Desktop.
Save sahid/472317 to your computer and use it in GitHub Desktop.
<form method='POST' action='http://upload.example.com' enctype='multipart/form-data' id='form'>
<input type='file' />
<input type='submit' />
</form>
<script>
var io = new goog.net.IframeIo;
goog.events.listen (io, goog.net.EventType.COMPLETE,
function (event) {
alert(event.target.getResponseText ());
});
io.sendFromForm (goog.dom.$ ('form'));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment