• 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

Get lat/lon from google maps url ftid (hex)

Explain how this array transposing and flattening function works

Multiply each value in array using array_map function

php echo remove slashes from url [duplicate]

Laravel Sanctum CSRF not authenticating

How to modify CSS in a specific page of the WP admin dashboard (backend)

how to create html table in php

How do I refresh a DIV content?

Only on Firefox "Loading failed for the <script> with source"

PHP Deprecated issue when running artisan command

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

ORA-12546: TNS:permission denied error connection to remote oracle server

Sentry on Symfony: how to exclude `NotFoundHttpException`

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

Transform array, set each array element with parent key php

About Contact Privacy policy Terms and conditions