• 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

PHP echo values of all sub keys [duplicate]

mysql_result is defined but mysql_free_result warns it expected a resource

Symfony process run throws exception - executing on command line works

Laravel Schedule not sending email

I cannot create a auto generated date time in mysql workbench

How to render html from a @foreach loop in a textarea

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

Laravel: HTML in notification

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Array to string conversion

Put content of wordpress page inside div

possible options to create pdf file using html elements to generate invoice in php and codeigniter

PHP: Convert any string to UTF-8 without knowing the original character set, or at least try

Installing Composer - Internal Error

PHP: Telegram Bot: Insert line break to text message

About Contact Privacy policy Terms and conditions