Skip to content

Instantly share code, notes, and snippets.

View dharFr's full-sized avatar

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / upload-form.html
Created July 23, 2011 14:10
Asynschronous HTML File Upload (fake Ajax)
<script language="javascript" type="text/javascript">
function formUploadCallback (result) {
console.log("Upload OK:", result);
alert('Upload OK');
}
</script>
<form target="upload_target" action="upload.php" enctype="multipart/form-data" method="post">
File: <input name="myfile" type="file" />
<input name="submitBtn" type="submit" value="Submit" />
</form>
@dharFr
dharFr / jquery.unserialize-0.2.js
Created June 6, 2011 10:22 — forked from rcmachado/jquery.unserialize.js
$.unserialize [updated] for jQuery
/**
* $.unserialize
*
* Takes a string in format "param1=value1&param2=value2" and returns an object { param1: 'value1', param2: 'value2' }.
* If the "param1" ends with "[]" the param is treated as an array.
*
* Parses the value as String, Int or Boolean
* @todo: parseFloat could also be useful I guess.
*
* Example: