• 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

What is the difference between client-side and server-side programming?

Access denied for user 'homestead'@'localhost' (using password: YES)

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

Laravel Passport - Not able to get token string in response?

PHPSpreadsheet - How Do I Use Auto Migration Tool

PHP and WebView - Cookie doesn't are the same

MOODLE: What does it mean to aggregate h5p assets?

Star and Half Star Rating in Laravel

How to change the app environment at run time?

Natural ORDER in Laravel Eloquent ORM

Adding the custom page with add_menu_page function on Wordpress

How to remove index.php and index from the URL using htaccess | PHP

Generate random username based on full name php

How can I easily switch between PHP versions on Mac OSX?

Load a .env file with PHP

About Contact Privacy policy Terms and conditions