• 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

PHPExcel_IOFactory::createWriter causes wrong behaviour

How to fix this error : Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI?

Target Laravelista is not instantiable

Session timeout in Yii2

Composer fails with kylekatarnls/update-helper on new homestead

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

How to fix Call to undefined method AppModelsTableName::factory?

Add custom text under order details on WooCommerce My account view order pages

PHP, how to convert Int value to Week days

PHP using str_starts_with for array to exclude same as with wildcard

Issue saving card for customer

generating a random code in php?

passwordless LDAP login and get user information using Kerberos ticket in PHP

How to convert time from one timezone to another in PHP

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

About Contact Privacy policy Terms and conditions