• 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

Filter WooCommerce products with post__in and additional meta queries

Prestashop cUrl Login

Send Outlook 2010 email using PHP

PHP file_get_contents function

How to load Codeigniter 4 lang file into an array variable

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

Parsing JSON File to array in PHP

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

How do I refresh a DIV content?

How to validate Envato Purchase Code in PHP

nginx err_connection_refused, can anyone help me?

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

Check if my GET request has Header: Token

Call to a member function givePermissionTo() on null

About Contact Privacy policy Terms and conditions