• 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

Reorder attribute dropdown terms in Woocommerce single variable products

SilverStripe unable to populate multiple member Childs

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Laravel Blade checkbox not checked

Implode columnar values between two arrays into a flat array of concatenated strings

PHP Sorting - getting 10, 11, 12 ... 1, 20, 2 rather than 1, 10, 11, 12 ... 2, 20

Distribute array row data to make multiple new rows

How to insert data from multiple select dropdown values into database?

MySQL - Connection failed: No route to host

PHP rotate matrix counter-clockwise

Add and update products to session cart in Laravel

Inserting data into SQL Server Db An Invalid direction was specified

Yii2 redirecting to previous page after login

SQL AVG() to 2 decimals

About Contact Privacy policy Terms and conditions