• 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

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

How to KeyBy where multiple items have the same key

Laravel - Browser displays message again when I press back button

How to get page number on dompdf PDF when using "view"

Adding the custom page with add_menu_page function on Wordpress

PHP password_verify

How to get Laravel's CSRF Token from Another Website?

Manage independently the decimal number of the price of each product [duplicate]

PHP Sorting - getting 10, 11, 12 ... 1, 20, 2 rather than 1, 10, 11, 12 ... 2, 20

Symfony Error: "An exception has been thrown during the rendering of a template"

PHP contact form configuration [duplicate]

laravel automatically deletes server.php on php artisan serve

ConstraintViolationListInterface to Exception in Symfony

Cut an arabic string

How can I get data from PHP to Android TextView?

About Contact Privacy policy Terms and conditions