• 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

Applying programmatically a coupon to an Order in WooCommerce3

PHP: Print caught exception like Xdebug

Image upload not working through ajax Laravel

Handling expired token in Laravel

enroll_table three field fetch to payment form to create payment field in laravel 5.5

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

Laravel UUID generation

Edit product hook WooCommerce

Pages are working fine on localhost but not running on the hosting server

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Laravel 5 issue with wherePivot

I cannot create a auto generated date time in mysql workbench

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

Attempt to read property "view" on null when sending password reset email

Dynamic table in HTML using MySQL and php

About Contact Privacy policy Terms and conditions