• 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 set default language not working

How to submit a form when page loads using JavaScript?

Symfony Error: "An exception has been thrown during the rendering of a template"

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

The "client_reference_id" argument is not passed

PHP function Not Working As Expected From functions.php Include File

Saving Data from form to database using AngularJS and php

Make Calculator - When Button clicked the No shows in Textbox.

selected value from the listbox in php

Clear javascript source cache laravel 5.8

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

how to remove white space in select 2

Laravel Blade checkbox not checked

Google Calendar API batch request PHP

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

About Contact Privacy policy Terms and conditions