• 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 to display MySQL table using php and edit it in a web browser

How to run a shell as root from php (apache)

How update php.ini on a Mac OS X Mojave?

PHP using str_starts_with for array to exclude same as with wildcard

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

Split a string array into pieces

Nginx RTMP not recording

Hide specific products from unlogged users based in product category in WooCommerce

Handle error for duplicate entries - PHP/MySQL

How to loop sql table data inside a html table

Post Form Data To phpmyadmin Database

PHP DOTENV unable to load env vars

How to get transaction details in notify_url page in paypal

PHP array_filter with arguments

PHP web3 ERC20 token function call

About Contact Privacy policy Terms and conditions