• 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 contact form configuration [duplicate]

Parsing JSON File to array in PHP

Can't call javascript alert alertify library from PHP

Why rand() every time I refresh the page?

Appending data to an anchor tag

enroll_table three field fetch to payment form to create payment field in laravel 5.5

Form Validation and Submission to database

Laravel insert dynamic input values with radio button

Printing more than one array using print_r or any other function in php

CodeIgniter 3 is generating a session file on each request, why?

How to insert data from multiple select dropdown values into database?

How to convert a carbon into string, to take the date only?

laravel 5.6 bulk inserting json data

PHP returning an error message and false

How to install php_imagick on wamp64

About Contact Privacy policy Terms and conditions