• 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

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

How to to send mail using gmail in Laravel?

PHPUnit gives error: Target [IlluminateContractsViewFactory] is not instantiable

Extract string between first whitespace and last whitespace in php

Dynamic table in HTML using MySQL and php

How to keep value of selected value after form submission?

Fatal error: [] operator not supported for strings

Is there a way to correctly use sanitize_text_field and wp_unslash that doesn't cause psalm to error with "expects string, possibly different type"

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

Error Class "LaravelFortifyFeatures" not found

Reload parent page after submit in iframe

Alert message after submitting form in PHP

How to create a video stream from a single dynamic image in PHP

Update Total in checkout of Woocommerce with Ajax Request

PHP/HTML: Creating A SubMenu

About Contact Privacy policy Terms and conditions