• 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

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

Destroy session upon refresh

Shopify password update using Shopify API

How can I make good efficent AJAX live forms with just jQuery and

Confirm Leave on External Links in Wordpress

WAMP Virtual Host not working

PHP array stringify

How to add class name to an existing tag in php

Laravel Sanctum CSRF not authenticating

Could not decode a text frame as UTF-8.

Add Class in html Dynamically in PHP

Twig - How to check if variable is a number / integer

Target Individual Form Instance/Counter Inside A PHP While Loop

woocommerce_wp_select options array from product attribute terms

Laravel whole batch is cancelled if one Job fails

About Contact Privacy policy Terms and conditions