• 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

Best way to scrolldown onpageload

Set quantity minimum, maximum and step at product level in Woocommerce

hidden INPUT value not available in $_POST

Laravel insert dynamic input values with radio button

How to submit a form when page loads using JavaScript?

Reorder attribute dropdown terms in Woocommerce single variable products

Substitute integers and dots with regex [duplicate]

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]

How to convert the int value to inch in PHP [closed]

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

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

Zig-zag scan an N x N array

How to loop sql table data inside a html table

Laravel after login Two factor not working

Convert regular text to array using notepad++

About Contact Privacy policy Terms and conditions