• 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

Zig-zag scan an N x N array

Laravel whole batch is cancelled if one Job fails

WHM Enabling mod_rewrite

PHP Print to Network Printer

Laravel 5.5 change unauthenticated login redirect url

Access relation of pivot table in Laravel

Change user role if checkout custom checkbox is checked in WooCommerce

What is my SQL missing?

Webscraping Symfony/Panther: Can't get HTML

Artisan, creating tables in database

get data-value with variable value

Confirm Leave on External Links in Wordpress

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

Laravel Nova, route not found

Cut an arabic string

About Contact Privacy policy Terms and conditions