• 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 - Store information with NO database

HTML and PHP in one file

SQL to convert multiple rows into a single row of variable length

Appending data to an anchor tag

Find out the name of the last script that included the current one

Can we define variables in `.tpl` files?

passwordless LDAP login and get user information using Kerberos ticket in PHP

Adding the custom page with add_menu_page function on Wordpress

Yii Ajax Submit button

How to loop a tree array with unknown depth and get array blocks?

Reload parent page after submit in iframe

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

Changing font color in javascript

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

How to increase the PHP upload limits [duplicate]

About Contact Privacy policy Terms and conditions