• 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

PHP to search within txt file and echo the whole line

How Can I Do LIMIT 1, 2 In WP_Query

How to show selected value using javascript in laravel

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

How to run or debug php on Visual Studio Code (VSCode)

Yii Ajax Submit button

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

Laravel print last executed SQL query with Query log

How can I make Laravel return a custom error for a JSON REST API

Sliders in Laravel

PHP and WebView - Cookie doesn't are the same

Edit XML in HTML form and submit to self

Exact alternate to mcrypt_encrypt in PHP 7.2

PHP, how to convert Int value to Week days

How to install php_imagick on wamp64

About Contact Privacy policy Terms and conditions