• 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 insert data into select2 search input after scan using qrcode

Woocommerce Checkout - Add conditional field required if one field is filled

How to downgrade or install a specific version of Composer?

Why do I have invalid argument supply for foreach in Laravel for json response? [duplicate]

Send same name multiple checkbox values via ajax

PHP, how to convert Int value to Week days

Additional price based on cart item count in WooCommerce

What is the difference between client-side and server-side programming?

Yii Ajax Submit button

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

Populate Dynamic Dropdowns List in Codeigniter

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Changing font color in javascript

Convert PHP array into HTML tag attributes separated by spaces

Increase value by 1 on button click

About Contact Privacy policy Terms and conditions