• 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

Target Individual Form Instance/Counter Inside A PHP While Loop

Creating a config file in PHP

Calculating Median of an array in PHP

How to redirect to another page and call a Function there on Angular ng-click

Laravel multi auth - Authentication user provider [] is not defined

how to remove white space in select 2

Adding multiple items to WooCommerce cart at once

Call to undefined function openssl_decrypt

Can't find vendor/autoload.php for Ratchet

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

How do I upload a laravel project on cPanel shared hosting?

I cannot create a auto generated date time in mysql workbench

how to upload binary image to sql server using php laravel

500 Internal Server Error on Ajax request. Not sure the origin of the problem

PHP/HTML: Creating A SubMenu

About Contact Privacy policy Terms and conditions