• 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

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

Laravel 8: Array to string conversion while calling route:list

MySQL upgrade causing unexpected results on simple WHERE clauses

How to create laravel storage symbolic link for production or sub domain system?

How to run a shell as root from php (apache)

Navigation idle on content download

Inserting data into SQL Server Db An Invalid direction was specified

file_put_content...fail to open stream:Permission denied in Laravel 5

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

Sum array values

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

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

Extract house numbers from address string

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

Yii Ajax Submit button

About Contact Privacy policy Terms and conditions