• 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

get attribute from class not working php 7

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

Live search query using JS and PHP for QA forum

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

Laravel Factory not calling callback 'afterCreating'

How to get the total hour from starting time to end time in php

Limit login attempts in Laravel 5.7

IlluminateDatabaseQueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

How to get variable from JavaScript to PHP [duplicate]

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

How to identify whether webp image is static or animated?

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

PHP SoapClient: set a namespace without prefix

array_map triple dimensional array [duplicate]

About Contact Privacy policy Terms and conditions