• 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

PHP if in_array() how to get the key as well?

How to access a var with "-" in PHP [duplicate]

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

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

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

array_map triple dimensional array [duplicate]

PHP rotate matrix counter-clockwise

How to send image,audio or video through the WhatsApp API - PHP

Auto increment id JSON

301 Redirect to remove query string on homepage only

PHP Print to Network Printer

Installing Composer - Internal Error

Transfer data between JavaScript and PHP through JSON

Update Order custom Field value with WooCommerce REST API

PHPExcel file download using AJAX call

About Contact Privacy policy Terms and conditions