• 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 Warning: Module already loaded in Unknown on line 0

How to change HTML structure inside WP <head>

PHP: remove filename from path

How to get multiple values with same key from an array PHP

Elastic Beanstalk with Laravel Envoy

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Custom post type single page not working

disable two buttons after clicking another button

Add customer email and phone in "Order" column to admin orders list on Woocommerce

How to create a cookie to store the timestamp of when a page is first loaded with php

PHPExcel export HTML table to xlsx

Add Class in html Dynamically in PHP

How do I enable error reporting in Laravel?

Laravel - Implicit route model binding with soft deleted data

HTML and PHP in one file

About Contact Privacy policy Terms and conditions