• 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 5.2: Unable to locate factory with name [default]

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

Hide email address with stars (*)

Coinpayments create_transaction "ERROR: Invalid command!"

PHP Get value from JSON [duplicate]

Return new collection without modifying original collection

HTML + PHP + PHPMAILER

Upgrade PHP on AWS Linux

Phalcon: setStatusCode returns empty response

Laravel Pagination links() not working

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

Redis Command To Sort Keys

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

Warning: A non-numeric value encountered

How to read laravel_session cookies saved in cookie memory of browser in client side?

About Contact Privacy policy Terms and conditions