• 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 give apache permission to write to home directory?

Add custom text under order details on WooCommerce My account view order pages

PHP array slice from position + attempt to return fixed number of items

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

Form repeater send wrong data with last element in Laravel

Symfony/Form add attribute based on the data

Symfony Error: "An exception has been thrown during the rendering of a template"

How to get page number on dompdf PDF when using "view"

WooCommerce Additional Information - if empty, hide

how to create html table in php

how to remove white space in select 2

PHP Form Not Inserting

Toggle between a textbox and a select using PHP

laravel 5.6 bulk inserting json data

Custom API and cunsuming in php?

About Contact Privacy policy Terms and conditions