Skip to content

Instantly share code, notes, and snippets.

@gmoothart
Created December 29, 2009 19:21
Show Gist options
  • Save gmoothart/265508 to your computer and use it in GitHub Desktop.
Save gmoothart/265508 to your computer and use it in GitHub Desktop.
Y.on("domready", function(ev) {
//
// submit batch order
//
Y.on('click', function(ev) {
var cfg = {
method: 'POST',
form: { upload: true, id: 'batchForm' },
on: { complete: onComplete }
};
Y.io( url, cfg );
}, '#submitOrderBtn');
//
// Private helper functions
//
function onComplete(id, r) { alert('never get here!'); }
}
<form id="batchForm">
<table>
<tr>
<td>
Enter batch name
</td>
<td>
<input id="Name" name="Name" type="text" value="" />
</td>
</tr>
<tr>
<td>
Enter file to upload:
</td>
<td>
<input type="file" name="BatchFile" />
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</table>
<input id="submitOrderBtn" type="button" value="Submit Order" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment