• 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

WordPress Security Standards want me to escape my html, but how to do it correctly?

Phpunit partial mock + proxy Entity

cakephp save drag and drop list order to database

How to install PHP composer inside a docker container

How do I truncate a decimal in PHP?

How can I make Laravel return a custom error for a JSON REST API

How can i hide dt if dd got empty value

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

Symfony run hint kernel.secret parameter not found

how to insert data into select2 search input after scan using qrcode

How should I get started using PHPUnit as a testing framework for a bunch of functions and classes I have already made?

401 Unauthorized only occurring on some pages in Laravel 8

Could not decode a text frame as UTF-8.

PHP array slice from position + attempt to return fixed number of items

Which is faster php date functions or carbon?

About Contact Privacy policy Terms and conditions