• 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

"cannot list resources" error from WooCommerce REST API

Boolean assignment operators in PHP

Laravel database insert with combining array and string

possible options to create pdf file using html elements to generate invoice in php and codeigniter

Access relation of pivot table in Laravel

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

Facebook API, get page post link (PHP)

How to use React Router with Laravel?

PHP header location absolute URL

Confirm Leave on External Links in Wordpress

Laravel eloquent update record without loading from database

add_action() function in wordpress not working [duplicate]

How to modify CSS in a specific page of the WP admin dashboard (backend)

How to Create WooCommerce Subscription Product via. REST API?

Parameter is not sent to Laravel route in Ajax

About Contact Privacy policy Terms and conditions