• 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

Popup Window and PHP form

How to get Laravel's CSRF Token from Another Website?

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

Composer Script echo

Attempt to read property "view" on null when sending password reset email

Laravel Mix Uncaught ReferenceError: $ is not defined

How to put php code inside opening and closing shortcodes

Laravel post contact form giving me error 419

Magento 2 - How to add new block to admin panel in product page?

Minimum order amount except for specific shipping method in WooCommerce

Prevent blank space in pdf pages (DomPdf)

Laravel get user data with profile

PHP Print to Network Printer

Autoloading classes in PHPUnit using Composer and autoload.php

CONCAT columns with Laravel 5 eloquent

About Contact Privacy policy Terms and conditions