• 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

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

Install mysql client in docker image

How can I make a full text index of the column?

How to modify CSS in a specific page of the WP admin dashboard (backend)

Best way to scrolldown onpageload

Search for array row with specific column value and return another value from qualifying row

Yii2: How to download backup files using spanjeta/yii2-backup?

Laravel Carbon throws error The format separator does not match

How to Display Data in Yajra Datatables Laravel 7?

How to create a video stream from a single dynamic image in PHP

PHP only Hit Counter?

Add New Parameter to Existing URL using htaccess

Add 2 Webcam in one page with WebcamJS

PHP: How to raise number to (tiny) fractional exponent?

How to unlink image from folder?

About Contact Privacy policy Terms and conditions