• 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

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

how to remove white space in select 2

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

How to get page number on dompdf PDF when using "view"

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

Appending data to an anchor tag

Laravel no logout option from menu after successfull login

onKeyUp event calculation not working on the following rows from php generated forms except the first one

Add 2 Webcam in one page with WebcamJS

how to pass row id in href of a tag in codeigniter controller?

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

How to MODIFY a Google Docs document via API using search-and-replace?

get folder directory from input type file - PHP

PHP file_get_contents function

Multiply each value in array using array_map function

About Contact Privacy policy Terms and conditions