• 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

Warning: A non-numeric value encountered

nginx err_connection_refused, can anyone help me?

using random function but it's displaying duplicates

Using Associative arrays

Transpose multidimensional array and join values with commas

jQuery Ajax Post with data

PHP: How to raise number to (tiny) fractional exponent?

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Testing subscription renewals on Stripe

Laravel 5 session not persisting after user is logged in

Laravel excel maatwebsite 3.1 import, date column in excel cell returns as unknown format number. How to solve this?

Class AppHttpControllersUserController Does Not Exist

Fetch files from next cloud storage and display in Laravel website

Dynamic table in HTML using MySQL and php

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

About Contact Privacy policy Terms and conditions