• 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

Destroy session upon refresh

PHP: Print caught exception like Xdebug

Add 2 Webcam in one page with WebcamJS

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

Laravel Mix Uncaught ReferenceError: $ is not defined

XML to CSV with PHP converter [problem with images grabing]

Python - Include another Python script

Yii Ajax Submit button

Backend cannot be reached after Typo3 login screen

Laravel 8 factory state afterCreating

javascript html popup window

Laravel-fopen: failed to open stream: Permission denied

Refresh specific HTML content that retrieves data from MySQL

Check if my GET request has Header: Token

How to convert a carbon into string, to take the date only?

About Contact Privacy policy Terms and conditions