• 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

How can I pass the list to the component variable in Laravel?

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

XSS attack still works despite htmlspecialchars() doing its work

How can i hide dt if dd got empty value

Explain how this array transposing and flattening function works

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Warning: A non-numeric value encountered

Elastic Beanstalk with Laravel Envoy

Array to string conversion

Laravel Jetsream Profile page not loading on fresh install

Update Total in checkout of Woocommerce with Ajax Request

Transform array, set each array element with parent key php

CSV to PHP class properties

Only on Firefox "Loading failed for the <script> with source"

What is PHP's equivalent of JavaScript's "array.every()"?

About Contact Privacy policy Terms and conditions