• 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

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Attempted to call an undefined method named "get" of class "MailController"

Check if user online laravel

Yii Ajax Submit button

How to get variable from JavaScript to PHP [duplicate]

How to get transaction details in notify_url page in paypal

How to install ZeroMQ for PHP on an Alpine Linux container?

enroll_table three field fetch to payment form to create payment field in laravel 5.5

How to find phpcs current default standard

PHP Download MP3 files from directory on server

How to show a popup modal in codeIgniter?

How to submit the custom form data in database in WordPress without plugin using ajax?

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

How to add a sidebar to Woocommerce Shop Page?

How to debug in WooCommerce 3+

About Contact Privacy policy Terms and conditions