• 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

Laravel Command Schedule Not Working Properly

best way to store error messages in Laravel (session or variable)

Zig-zag scan an N x N array

Batch request Google Calendar php API

Adding reCAPTCHA v2 into my PHP file

php file upload scanning using clamav, permissions on /tmp/

How to fix Call to undefined method AppModelsTableName::factory?

(Laravel) How to delete multiple models including optional relationships?

How to add class name to an existing tag in php

Populate Dynamic Dropdowns List in Codeigniter

laravel MVC execution flow

PHP | "The requested PHP extension bcmath is missing from your system."

Get image type from base64 encoded src string

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

Pass an image through AJAX [duplicate]

About Contact Privacy policy Terms and conditions