• 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

Unable to match results of php hash_hmac() and coldfusion hmac()

Two buttons one form

Pass an image through AJAX [duplicate]

Laravel implode array items to new lines

AJAX call fails with SyntaxError: Unexpected end of JSON input

how to sort by a custom appended relation to model

Set quantity minimum, maximum and step at product level in Woocommerce

PHP 8.1: strftime() is deprecated

Reducing authentication calls on external API (Laravel 5.6)

Substitute integers and dots with regex [duplicate]

How to get the ID of the link in another page in php

Star rating with half star support

PHP SoapClient: set a namespace without prefix

I cannot create a auto generated date time in mysql workbench

PHP Sorting - getting 10, 11, 12 ... 1, 20, 2 rather than 1, 10, 11, 12 ... 2, 20

About Contact Privacy policy Terms and conditions