• 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

WHERE IN array binding in DB::raw laravel 5.4

Add rows to Single product Additional information table in WooCommerce 3.6

Laravel websockets AWS EC2 - Connection failed

Laravel csrf token mismatch for ajax POST Request

Log a user out of a website when they put their computer to sleep

Explode not working properly with dash

How do I refresh a DIV content?

Why does array_map() with null as callback create an "array of arrays"?

Changing font color in javascript

Get WooCommerce products from specific category

PHP array_filter with arguments

merge all files in directory to one text file

How to make dot match newline characters using regular expressions

Laravel 5.1 Unknown database type enum requested

PHP mail sending empty mails

About Contact Privacy policy Terms and conditions