• 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

Confirm Leave on External Links in Wordpress

Unable to Edit config.inc.php

CSS file not imported in laravel blade view

laravel MVC execution flow

Inserting Country Selection into MySQL PHP [duplicate]

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Composer Script echo

Symfony Error: "An exception has been thrown during the rendering of a template"

args[max_input] woocommerce if statement confused

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

Group data in a multidimensional array based on two columns

Could not decode a text frame as UTF-8.

Laravel Mix Uncaught ReferenceError: $ is not defined

Target Individual Form Instance/Counter Inside A PHP While Loop

Adding reCAPTCHA v2 into my PHP file

About Contact Privacy policy Terms and conditions