• 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

Class AppHttpControllersUserController Does Not Exist

PHP: convert all UTF-8 characters to HTML entities

Laravel UUID generation

best way to store error messages in Laravel (session or variable)

Warning: sqlite_query() expects parameter 1 to be resource, string given

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

Connecting an HTML webpage to a SQL Server

Get data from accuweather api url

laravel 5.6 bulk inserting json data

How to skip cart page on woocomerce for certain products only?

How to edit Records using CodeIgniter

SQL to convert multiple rows into a single row of variable length

How can I make this nested location configuration use the correct path to call a php program?

How to make dot match newline characters using regular expressions

PHP Slim Framework request using withAttribute error

About Contact Privacy policy Terms and conditions