• 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

How to to send mail using gmail in Laravel?

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

passwordless LDAP login and get user information using Kerberos ticket in PHP

Symfony Error: "An exception has been thrown during the rendering of a template"

Performance of foreach, array_map with lambda and array_map with static function

Laravel MSSQL Server Connection not working

Best way to scrolldown onpageload

How do I remove this delivery notification from here?

Python - Include another Python script

correct PHP headers for pdf file download

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

Utf8 encoding issue with Laravel

Creating Combinations of Elements

I want to display a sweetalert after the inserting of data in my database

AJAX call fails with SyntaxError: Unexpected end of JSON input

About Contact Privacy policy Terms and conditions