• 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 separate letters and digits from a string in php

Post Form Data To phpmyadmin Database

possible options to create pdf file using html elements to generate invoice in php and codeigniter

merge all files in directory to one text file

What is my SQL missing?

laravel automatically deletes server.php on php artisan serve

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

Laravel Factory not calling callback 'afterCreating'

Laravel no logout option from menu after successfull login

Creating live search with AJAX and CodeIgniter

shell errors running php exec

Can't call javascript alert alertify library from PHP

Get data from accuweather api url

Change the alert text on add to cart action without selected variation in Woocommerce

Insert multidimensional array to codeigniter cart

About Contact Privacy policy Terms and conditions