• 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

Currently Using CodeIgniter Framework i have an Error

What is PHP's equivalent of JavaScript's "array.every()"?

Laravel 8 Multiple Relationships for Factory

How to Display Data in Yajra Datatables Laravel 7?

Get WooCommerce product variation attribute terms in admin products general box

Insert And Retrieve Data in MySQL with $.post Noob Question

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

Not able to access model in the controller mautic

how to check version of codeigniter framework?

How can I get a div content in php

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

PHP array slice from position + attempt to return fixed number of items

PHP header location absolute URL

SlimExceptionHttpNotFoundException

About Contact Privacy policy Terms and conditions