• 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

Select option from dropdown menu with PHP and mySql

WooCommerce Additional Information - if empty, hide

how can I set a session variable in Drupal 8 and get it in a php script?

PHP contact form configuration [duplicate]

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

Laravel Mix Uncaught ReferenceError: $ is not defined

how to use extended ASCII instead of unicode in PHP

how to redirect the user back to desired URL after login page in PHP?

Natural ORDER in Laravel Eloquent ORM

How can I pass the list to the component variable in Laravel?

dockerizing Laravel + vue

Two buttons one form

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

PHP Deprecated issue when running artisan command

Refresh specific HTML content that retrieves data from MySQL

About Contact Privacy policy Terms and conditions