• 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

jQuery Ajax Post with data

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

500 Internal Server Error on Ajax request. Not sure the origin of the problem

PHP Include for HTML?

Call to a member function givePermissionTo() on null

Correctly determine if date string is a valid date in that format

Group data in a multidimensional array based on two columns

Edit product hook WooCommerce

Pass an image through AJAX [duplicate]

No result using makeStyles Material UI in react 18

SlimExceptionHttpNotFoundException

Changing font color in javascript

zsh: command not found: php

How do I refresh a DIV content?

file_get_contents() without "Http" to access external URL [closed]

About Contact Privacy policy Terms and conditions