• 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

Why is this PHP array not the same?

Substitute integers and dots with regex [duplicate]

protect images from being copied

Dropdown with current value from Mysql

Elastic Beanstalk with Laravel Envoy

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

Performance of foreach, array_map with lambda and array_map with static function

Create a zip file and download it

Symfony autowiring issues since docker update

How to get quarter for future date using Carbon?

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

Limit login attempts in Laravel 5.7

Woocommerce Checkout - Add conditional field required if one field is filled

merging two arrays with specified index

Laravel PackageManifest.php: Undefined index: name

About Contact Privacy policy Terms and conditions