• 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

Edit product hook WooCommerce

Image upload not working through ajax Laravel

Put content of wordpress page inside div

Yii2: How to download backup files using spanjeta/yii2-backup?

Results page in other window

401 Unauthorized only occurring on some pages in Laravel 8

insert multiple rows in a saveall in cakephp

Results page in other window

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

How to show a popup modal in codeIgniter?

Statement that checks whether a URL contains a particular path?

using random function but it's displaying duplicates

PHP Download MP3 files from directory on server

Adding the custom page with add_menu_page function on Wordpress

how to identify the web server name of remote host

About Contact Privacy policy Terms and conditions