I want to upload a whole user-updated html div, to later download again. This is what I put in the header of the html (it gave no errors, but doesn't upload either):
What am I missing? Thanks!
Code:
<script type="text/javascript">
$(document).ready(function(){ document.onbeforeunload = function {
content = $('#content').html();
$.post(url, {jsonData: JSON.stringify(content) }, function(response){$('#changelist').text(response); });
}
)};
})
</script>
Comment