• 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

LARAVEL: How to fetch id dynamically in a query builder?

using random function but it's displaying duplicates

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

The "client_reference_id" argument is not passed

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Invalid value in field "itemtype" in Google Search Console

Select option from dropdown menu with PHP and mySql

How do I Post to .txt document before form submits

How to add a heading in between checkout fields of WooCommerce

PHP array sort and remove duplicates by two field values

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

get data-value with variable value

MISSING UPDATES FOR: MEDIA Drupal 9

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

merging two arrays with specified index

About Contact Privacy policy Terms and conditions