• 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

Why i get wrong output for html markdown?

woocommerce get_order_report_data to show order_item_id

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

php echo remove slashes from url [duplicate]

jQuery Ajax Post with data

XML to CSV with PHP converter [problem with images grabing]

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

Pass a select with mysqli_fetch_row to a table

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

How to loop a tree array with unknown depth and get array blocks?

Send same name multiple checkbox values via ajax

Confirm Leave on External Links in Wordpress

how to hide previous markers when new markers added in google map javascript api

get data-value with variable value

About Contact Privacy policy Terms and conditions