• 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

CodeIgniter 4: Like and Dislike Functionality

Exact alternate to mcrypt_encrypt in PHP 7.2

zsh: command not found: php

Magento 2 - How to add new block to admin panel in product page?

How to programmatically find public properties of a class from inside one of it's methods

How to get total pages of PDF with FPDF?

How to install LDAP in Docker php-fpm alpine

AJAX call fails with SyntaxError: Unexpected end of JSON input

Target Individual Form Instance/Counter Inside A PHP While Loop

MySQL order by field in Eloquent

how to search for a file with php

How can I create a Download Page with post php method?

Get latest Tweets - What API

Issue saving card for customer

Laravel views are showing from cache on one server but works fine on other server

About Contact Privacy policy Terms and conditions