• 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

PHP: Convert any string to UTF-8 without knowing the original character set, or at least try

How to get AJAX to post on second page?

Printing more than one array using print_r or any other function in php

Jquery DataTables: Data not displaying in table via Ajax

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

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

How do I get friend list from Friends table with counts of friends of my friends

PHP: PDO + CSV export not downloading (headers issue?)

PHP - CURL using HTTPS [closed]

JSON Render Issue in Date Object Laravel and PHP 7.4

Refresh specific HTML content that retrieves data from MySQL

How can I access an array/object?

Update Order custom Field value with WooCommerce REST API

Get image type from base64 encoded src string

How to get variable from JavaScript to PHP [duplicate]

About Contact Privacy policy Terms and conditions