• 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

Pass an image through AJAX [duplicate]

CSV to PHP class properties

PHPExcel file download using AJAX call

Yii Ajax Submit button

CodeIgniter 3 is generating a session file on each request, why?

How to get monthly wise data in laravel

retrieve data from database using session

Show Custom Data in Woocommerce Order Details Admin Area

PHPExcel How to set conditional formatting to change cell background color based on cells values

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

PHP returning an error message and false

Can I use a WooCommerce function without any WooCommerce page?

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

About Contact Privacy policy Terms and conditions