• 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

Add and update products to session cart in Laravel

Laravel Command Schedule Not Working Properly

how to identify the web server name of remote host

hidden INPUT value not available in $_POST

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

Ajax GET request fails in laravel 8

Add record for each array elements if missing in table

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

Sum column values from multiple arrays

best way to store error messages in Laravel (session or variable)

how to remove white space in select 2

500 Internal Server Error on Ajax request. Not sure the origin of the problem

yii2 and mssql insert varbinary into model

php script to delete files older than 24 hrs, deletes all files

How can I create a Download Page with post php method?

About Contact Privacy policy Terms and conditions