• 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

Google API Heatmap Layer exception, why?

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

Vimeo API: how to save a vimeo into a subfolder?

Doctrine 2 mapping referencing unique key

Using array_intersect on a multi-dimensional array

wordpress : How to specify the cause "This site can’t be reached"

MySQL default time format UTC or GMT?

PHP mail sending empty mails

Prevent blank space in pdf pages (DomPdf)

Set quantity minimum, maximum and step at product level in Woocommerce

Laravel eloquent update record without loading from database

How to disable only_full_group_by option in Laravel

How to identify whether webp image is static or animated?

How to Create WooCommerce Subscription Product via. REST API?

Laravel : How to Create Dropdown to Select FOREIGN KEY from Other Table?

About Contact Privacy policy Terms and conditions