• 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

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

How do I do HTTP basic authentication using Guzzle?

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

Laravel unique validation on multiple columns

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

Laravel Livewire: jQuery not working in child component loaded via @if statement

Minimum order amount except for specific shipping method in WooCommerce

Upload a file Using PHP and JavaScript

how to get value from array in laravel

PHP mail function is sending blank message body

phpseclib 2.0 can not use Composer to create autoload

How do I remove this delivery notification from here?

Hide email address with stars (*)

How can I format this number correctly using PHP?

How do I Post to .txt document before form submits

About Contact Privacy policy Terms and conditions