• 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

Unable to run composer install

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

laravel controller function parameters

php retrieve specific data onclick from database in a list format

MySQL - Connection failed: No route to host

how to redirect the user back to desired URL after login page in PHP?

Update Total in checkout of Woocommerce with Ajax Request

CSV to PHP class properties

Pass an image through AJAX [duplicate]

How do I set the maximum php memory limit

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

Clients authentication and user authentication with laravel

How to Install Composer Require doctrine/dbal

Set quantity minimum, maximum and step at product level in Woocommerce

About Contact Privacy policy Terms and conditions