• 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 get password for the instance created from AMI

How to keep value of selected value after form submission?

Adding one microsecond to Datetime object in PHP

Change user role if checkout custom checkbox is checked in WooCommerce

Add 2 Webcam in one page with WebcamJS

Group rows by column and sum another column within groups [duplicate]

How to create a cookie to store the timestamp of when a page is first loaded with php

how to remove white space in select 2

Can I write PHP code across multiple lines per statement?

How to give apache permission to write to home directory?

Using array_intersect on a multi-dimensional array

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

calling server using nusoap with complextype

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

jQuery Ajax Post with data

About Contact Privacy policy Terms and conditions