• 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

WooCommerce Subscriptions: Remove role on cancelled subscription

PHP: Telegram Bot: Insert line break to text message

str_word_count() function doesn't display Arabic language properly

Laravel after login Two factor not working

protect images from being copied

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

Split a string array into pieces

How to get variable from JavaScript to PHP [duplicate]

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Required field only if another field has a value, must be empty otherwise

httpd.conf on Windows: can't locate API model structure `php8_module`

Can't call javascript alert alertify library from PHP

"cannot list resources" error from WooCommerce REST API

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

About Contact Privacy policy Terms and conditions