• 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

Check If array is null or not in php

Check if user online laravel

How to give apache permission to write to home directory?

array_key_exists(): The first argument should be either a string or an integer

Reload parent page after submit in iframe

PHP echo values of all sub keys [duplicate]

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

Get WooCommerce product variation attribute terms in admin products general box

Upload a file Using PHP and JavaScript

How to run a shell as root from php (apache)

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

MySQL upgrade causing unexpected results on simple WHERE clauses

IlluminateDatabaseQueryException could not find driver [duplicate]

sort() not affecting original array while inside foreach loop

send email using gmail-api and google-api-php-client

About Contact Privacy policy Terms and conditions