• 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

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

PHP Find Array Index value in multi-line array

PHP block shortcut in Visual Studio Code

mysql slow on updates for a well optimized query

Split comma separated value from table column into rows using mysql?

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Elastic Beanstalk with Laravel Envoy

Check if string contains a value in array [duplicate]

PHP array sort and remove duplicates by two field values

Natural ORDER in Laravel Eloquent ORM

AJAX call fails with SyntaxError: Unexpected end of JSON input

Currently Using CodeIgniter Framework i have an Error

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Sum column values from multiple arrays

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

About Contact Privacy policy Terms and conditions