• 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

PHP Find Array Index value in multi-line array

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Select option menu read from database and use it's values

PHP how to detect if running on arm64 cpu?

Changing font color in javascript

How to install ZeroMQ for PHP on an Alpine Linux container?

Multiply each value in array using array_map function

insert multiple rows in a saveall in cakephp

How can I get new CSRF token in LARAVEL by using ajax

Multiple order by in WooCommerce

Mobile browsers are adding .html to filename on download

Substitute integers and dots with regex [duplicate]

How to get page number on dompdf PDF when using "view"

PHPExcel How to set conditional formatting to change cell background color based on cells values

Attempted to call an undefined method named "get" of class "MailController"

About Contact Privacy policy Terms and conditions