• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

JQuery content editable div and text box on submit not sending POST

javascriptphpjqueryhtmltext-editor


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!');
            }
        });
    });
});

Related Snippets

CSV to PHP class properties

Creating live search with AJAX and CodeIgniter

How to keep value of selected value after form submission?

browsersync doesn't work with XAMPP

MongoDB Duplicate Documents even after adding unique key

Hi, I am making a contact form thingy, and my php isn't working any reason why?

How do I refresh a DIV content?

How to pass security cloudflare server with php curl

could not find driver Debian SQL Server PHP

Get WooCommerce product variation attribute terms in admin products general box

Laravel no logout option from menu after successfull login

Why does using salted hash on python and php give me different results?

Adding Multiple Custom Post Types in Wordpress

Form Validation and Submission to database

Assign output of PHP function to a variable

About Contact Privacy policy Terms and conditions