• 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

advanced custom fields wordpress custom class

CodeIgniter extend CI_URI undefined method

PDOException SQLSTATE[HY000] [2002] No such file or directory

Add 2 Webcam in one page with WebcamJS

How can I access an array/object?

Class AppHttpControllersUserController Does Not Exist

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

Laravel dosen't connect with Oracle

How to Display Data in Yajra Datatables Laravel 7?

Twig - How to check if variable is a number / integer

Dynamic table in HTML using MySQL and php

Extract string between first whitespace and last whitespace in php

Don't show recurring price for WooCommerce subscriptions worth 0$

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

Laravel 4 Redirect::back() not going to previous page (refreshing current page)

About Contact Privacy policy Terms and conditions