• 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

Not able to override collapsible.js in magento 2

loop through an anchor id

Refresh specific HTML content that retrieves data from MySQL

Popup Window and PHP form

Symfony Mercure "Failed to send an update"

Fatal error: Array callback has to contain indices 0 and 1

Creating command to backup MySql database in Laravel

how to fix Service provider class not found when using repository?

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

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

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

Add New Parameter to Existing URL using htaccess

Mysqli multi query error

How to convert a carbon into string, to take the date only?

CodeIgniter 4: Like and Dislike Functionality

About Contact Privacy policy Terms and conditions