• 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

Get image type from base64 encoded src string

How to add automatically collapse/expand in content wordpress (single.php)?

How to load Codeigniter 4 lang file into an array variable

Composer fails with kylekatarnls/update-helper on new homestead

Match single unknown parameter php (Morse-code Regex)

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

Filter WooCommerce products with post__in and additional meta queries

Mobile browsers are adding .html to filename on download

How to add class name to an existing tag in php

Changing font color in javascript

Laravel set default language not working

Yii2: How to download backup files using spanjeta/yii2-backup?

using random function but it's displaying duplicates

Group data in a multidimensional array based on two columns

Magento 2 - How to add new block to admin panel in product page?

About Contact Privacy policy Terms and conditions