JQuery content editable div and text box on submit not sending POST
PHP Snippet 1:
$(document).ready(function() {
$("#save").on("click", function(event) {
var formData = {text: $("#editor").html(), name: $("#name").val()};
event.preventDefault();
$.ajax({
url: 'freewordsave.php',
type:'POST',
data: formData,
success: function(msg)
{
alert('Your file was saved!');
}
});
});
});