• 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

Sagepay Error The Vendor failed to provide a RedirectionURL

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

Redis Command To Sort Keys

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Performance of foreach, array_map with lambda and array_map with static function

Alert message after submitting form in PHP

Laravel Database Strict Mode

Not able to access model in the controller mautic

AJAX call fails with SyntaxError: Unexpected end of JSON input

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

How to set dynamic `home` and `siteurl` in WordPress?

How to to send mail using gmail in Laravel?

Insert And Retrieve Data in MySQL with $.post Noob Question

How to execute sql code based on fetch array

About Contact Privacy policy Terms and conditions