• 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 to install php_imagick on wamp64

How to insert Google Adsense Code in PHP script?

The "client_reference_id" argument is not passed

Yii Ajax Submit button

The sum of the user's points

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

How to set time with DateTime modify?

Get all WooCommerce products within own plugin

Laravel: Why is my variable not being set while it's in the construct function of the controller?

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Webscraping Symfony/Panther: Can't get HTML

How to render html from a @foreach loop in a textarea

PHPExcel How to set conditional formatting to change cell background color based on cells values

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

Live search query using JS and PHP for QA forum

About Contact Privacy policy Terms and conditions