• 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

Post Form Data To phpmyadmin Database

jwt decode throws Invalid argument supplied for foreach() on php-jwt and codeignitor 4

PHP password_verify

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

possible options to create pdf file using html elements to generate invoice in php and codeigniter

Session timeout in Yii2

Two buttons one form

php mysql + create a friend request system

Laravel: HTML in notification

Limit of log line written to Apache Errorlog from mod php error_log

MySQL upgrade causing unexpected results on simple WHERE clauses

How to get values inside <![CDATA[values]] > using php DOM?

CSV to PHP class properties

How to fix bootstrap multiselect search data using ajax

html-php form submission after validation through JavaScript [closed]

About Contact Privacy policy Terms and conditions