• 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 fix Call to undefined method AppModelsTableName::factory?

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

Unable to create lockable file - Laravel 8 & PHP 8

php mysql + create a friend request system

Require a class from another class - php

How to set a domain name with php artisan serve

How to programmatically find public properties of a class from inside one of it's methods

"There is no active transaction" when refreshing database in Laravel 8.0 test

Batch request Google Calendar php API

How to map the two arrays with a duplicate value?

How to add automatically collapse/expand in content wordpress (single.php)?

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

GRPC installed successfully on ubuntu but php is looking for it in another folder

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

Laravel query builder binding parameters more than once

About Contact Privacy policy Terms and conditions