• 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 Route issues with Route order in web.php

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

Pass an image through AJAX [duplicate]

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Applying programmatically a coupon to an Order in WooCommerce3

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

Require a class from another class - php

How to test a php login connected to a mysql db through xampp?

PHP usort() order in case of equality

Ajax GET request fails in laravel 8

Error converting docx to pdf using Unoconv

Normalize DateInterval in PHP

nginx err_connection_refused, can anyone help me?

About Contact Privacy policy Terms and conditions