• 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

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Reload parent page after submit in iframe

PHPExcel_IOFactory::createWriter causes wrong behaviour

Could not decode a text frame as UTF-8.

Laravel insert dynamic input values with radio button

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

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

javascript html popup window

Star and Half Star Rating in Laravel

Create tags in laravel post publishing

How do I enable error reporting in Laravel?

Saving Data from form to database using AngularJS and php

Best way to scrolldown onpageload

how to insert data into select2 search input after scan using qrcode

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

About Contact Privacy policy Terms and conditions