• 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

Can't call javascript alert alertify library from PHP

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

Having trouble with PDO queries (Notice: Undefined index)

How to get an Array value inside an object in an array Php [duplicate]

Check if a string contain multiple specific words

Check if string contains a value in array [duplicate]

OctoberCMS / Anonymous Global Scope

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Limit of log line written to Apache Errorlog from mod php error_log

How do I call Validator from a namespace with an already existing Validator class

PHPExcel file download using AJAX call

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

How to add a custom field to all Woocommerce attribute terms using add_action

Add a custom text for a particular product on specific email notification in Woocommerce

Laravel no logout option from menu after successfull login

About Contact Privacy policy Terms and conditions