• 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

Laravel Route issues with Route order in web.php

Applying programmatically a coupon to an Order in WooCommerce3

Laravel query builder binding parameters more than once

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

Laravel display validation error

Add Class in html Dynamically in PHP

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

Zig-zag scan an N x N array

How to identify whether webp image is static or animated?

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

How to keep value of selected value after form submission?

How to remove from a multidimensional array all duplicate elements including the original?

Login if user is active using Laravel Breeze

how to prevent float variables displaying as scientific notation when printing [duplicate]

how to remove %20 in the url in php

About Contact Privacy policy Terms and conditions