• 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

HTML and PHP in one file

Laravel print last executed SQL query with Query log

HTML + PHP + PHPMAILER

Set quantity minimum, maximum and step at product level in Woocommerce

How can I create a Download Page with post php method?

Symfony Error: "An exception has been thrown during the rendering of a template"

browsersync doesn't work with XAMPP

Prevent blank space in pdf pages (DomPdf)

PHP Find Array Index value in multi-line array

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

WordPress - Dynamically add user ID to the end of a URL

php retrieve specific data onclick from database in a list format

How to write PHP in XSLT

correct PHP headers for pdf file download

Composer fails with kylekatarnls/update-helper on new homestead

About Contact Privacy policy Terms and conditions