• 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

passwordless LDAP login and get user information using Kerberos ticket in PHP

Handle error for duplicate entries - PHP/MySQL

Batch request Google Calendar php API

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

protect images from being copied

Utf8 encoding issue with Laravel

How to redirect to another page and call a Function there on Angular ng-click

PHP block shortcut in Visual Studio Code

Cut an arabic string

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

Respond with status code 401 on authentication failure using Laravel and Passport?

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

Malformed MIME header error in Symfony 5.3

Nginx RTMP not recording

Problem with fetching data from database in Laravel

About Contact Privacy policy Terms and conditions