• 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

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

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

I want to store data in new index as per my key in php [duplicate]

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

if statement inside concatenation

Laravel 8: Array to string conversion while calling route:list

How to add class name to an existing tag in php

Manage independently the decimal number of the price of each product [duplicate]

Warning: sqlite_query() expects parameter 1 to be resource, string given

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

How to loop a tree array with unknown depth and get array blocks?

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

How to break out of a foreach once a condition is met?

WordPress - Dynamically add user ID to the end of a URL

About Contact Privacy policy Terms and conditions