Skip to content

Instantly share code, notes, and snippets.

View xarg's full-sized avatar

Alex Plugaru xarg

View GitHub Profile
<!-- ZPT: write clean inline JavaScript code -->
<!-- rstk.json_dumps translates the Python dict to a JS dict, used in JS code -->
<script>
function setup_my_html(config) {
var e = document.getElementById(config.the_id);
//....
}
</script>
/**
* This is an example to create persistent forms using
* HTML5 localStorage + jQuery serialization and
* url.decode from http://www.webtoolkit.info/
*
*
* The example bellow is seriously unoptimized.
* It listens to changing events in the form and
* serializes the data of the form in localStorage
*/