• 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

Valet, Xdebug after reboot Big Sur not working

Dropzone: Submit both form data and dropzone at once

Converting IPv6 to IPv4 address in PHP

MOODLE: What does it mean to aggregate h5p assets?

jQuery Ajax Post with data

PHP/HTML: Creating A SubMenu

Live search query using JS and PHP for QA forum

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

How to redirect to another page after n seconds in wordpress without using javascript?

How can i update or reset my password without entering email field in laravel-8?

Hi, I am making a contact form thingy, and my php isn't working any reason why?

I want a way to give path to my files which are outside of public folder in laravel

How to override header set in Apache config with more specific header in a virtual host

Detect a fetch request in PHP

get folder directory from input type file - PHP

About Contact Privacy policy Terms and conditions