• 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 for PDO Results, If None Display Message, If Yes then Loop Through

PHP Imap , php 7.4.3 on mac osx catalina

how can I set a session variable in Drupal 8 and get it in a php script?

Access denied for user 'homestead'@'localhost' (using password: YES)

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

Yii2: How to download backup files using spanjeta/yii2-backup?

Add record for each array elements if missing in table

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

How can I get data from PHP to Android TextView?

Split comma separated value from table column into rows using mysql?

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

get attribute from class not working php 7

How to install ZeroMQ for PHP on an Alpine Linux container?

enable Apache http Authorization header

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

About Contact Privacy policy Terms and conditions