• 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

Input and output values for php into the browser?

How can I make this nested location configuration use the correct path to call a php program?

jQuery Ajax Post with data

Alert message after submitting form in PHP

backup files to google drive using PHP

How can i hide dt if dd got empty value

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

Detect if PHP session exists

Laravel: HTML in notification

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

Dynamic dropdown Ajax PHP request

How to identify whether webp image is static or animated?

Statement that checks whether a URL contains a particular path?

Results page in other window

wp_remote_get() not passing authentication

About Contact Privacy policy Terms and conditions