• 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

Laravel 8 Multiple Relationships for Factory

I want to display a sweetalert after the inserting of data in my database

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Yii2: How do I debug console commands?

Having issue with matching rows in the database using PDO

Wordpress add responsive srcset header image to theme

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

Where do I need to place a hook for phpunit?

Sagepay Error The Vendor failed to provide a RedirectionURL

Exact alternate to mcrypt_encrypt in PHP 7.2

SQL to convert multiple rows into a single row of variable length

Show only featured products in Woocommerce shop page

Creating live search with AJAX and CodeIgniter

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

OctoberCMS / Anonymous Global Scope

About Contact Privacy policy Terms and conditions