• 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

Printing more than one array using print_r or any other function in php

how to hide previous markers when new markers added in google map javascript api

Laravel MSSQL Server Connection not working

Where do I need to place a hook for phpunit?

Laravel get user data with profile

Unable to run composer install

The sum of the user's points

Upload a file Using PHP and JavaScript

Check if my GET request has Header: Token

JSON Render Issue in Date Object Laravel and PHP 7.4

How to identify whether webp image is static or animated?

Load a .env file with PHP

How to override htaccees file for cache control header

Chunk and transpose a flat array into rows with a specific number of columns

how to create html table in php

About Contact Privacy policy Terms and conditions