• 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

How to submit the custom form data in database in WordPress without plugin using ajax?

How to send parameters in soap request in php in __soapcall() function

Chunk and transpose a flat array into rows with a specific number of columns

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

Laravel views are showing from cache on one server but works fine on other server

php echo remove slashes from url [duplicate]

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

Detect a fetch request in PHP

I want to display default profile image if user do not have profile image

Laravel - Browser displays message again when I press back button

httpd.conf on Windows: can't locate API model structure `php8_module`

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

How to convert the int value to inch in PHP [closed]

add_action() function in wordpress not working [duplicate]

How to update array value in Laravel

About Contact Privacy policy Terms and conditions