• 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

Can't exclude directories from .htaccess mobile redirect?

What is my SQL missing?

WAMP/Wordpress - cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

Two buttons one form

How to Generate PDF invoice to XML format using mPDF

How to get unique slug to same post-title for other time too?

Prevent blank space in pdf pages (DomPdf)

How can i hide dt if dd got empty value

PHP-Sort array based on another array?

passwordless LDAP login and get user information using Kerberos ticket in PHP

Laravel set default language not working

Laravel s3 upload file with metadata using pre-signed url

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

Laravel Factory not calling callback 'afterCreating'

How do I truncate a decimal in PHP?

About Contact Privacy policy Terms and conditions