• 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

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

PHP - installing Xdebug on Mac with XAMPP (Unix File)

HTML and PHP in one file

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

Open a popup box after receiving result from ajax

jQuery Ajax Post with data

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Wordpress add responsive srcset header image to theme

Match single unknown parameter php (Morse-code Regex)

Pagekite error: FAIL: localhost:8080 is down

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

How to write PHP in XSLT

Appending data to an anchor tag

Sum array values of a column within each column of an array with 3 levels

About Contact Privacy policy Terms and conditions