• 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

jQuery Ajax Post with data

ORA-12546: TNS:permission denied error connection to remote oracle server

Add Class in html Dynamically in PHP

How to average columns of data from multiple, flat arrays?

How do I call Validator from a namespace with an already existing Validator class

javascript html popup window

Target class controller does not exist - Laravel 8

Unable to run composer install

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

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

What will the best solution for this multiple optional filter?

Laravel PackageManifest.php: Undefined index: name

Multiply each value in array using array_map function

Insert And Retrieve Data in MySQL with $.post Noob Question

cakephp save drag and drop list order to database

About Contact Privacy policy Terms and conditions