• 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

No definition found for function in vendor vscode

PHP, how to convert Int value to Week days

how to make my own auto increment in php?

Wordpress how to get the post thumbnail inside a figure tag

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

WAMP Virtual Host not working

How can I create a Download Page with post php method?

WordPress Security Standards want me to escape my html, but how to do it correctly?

How to use $this->session->set_userdata in codeigniter

401 Unauthorized only occurring on some pages in Laravel 8

Best way to scrolldown onpageload

The sum of the user's points

how to retrieve the first and last instance of a row in pdo dataset

How to keep value of selected value after form submission?

About Contact Privacy policy Terms and conditions