• 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 can i hide dt if dd got empty value

How do I call Validator from a namespace with an already existing Validator class

Exact alternate to mcrypt_encrypt in PHP 7.2

Display the WooCommerce product price inside a custom function

PHP - CURL using HTTPS [closed]

How can I make a full text index of the column?

Sentry on Symfony: how to exclude `NotFoundHttpException`

Substitute integers and dots with regex [duplicate]

Wordpress 'post_type_link' hides permalink

How to pass security cloudflare server with php curl

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

MOODLE: What does it mean to aggregate h5p assets?

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

javascript html popup window

How to increase the PHP upload limits [duplicate]

About Contact Privacy policy Terms and conditions