• 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

Can't call javascript alert alertify library from PHP

How to disable widget block editor of WordPress?

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

How to identify whether webp image is static or animated?

sort() not affecting original array while inside foreach loop

how to pass row id in href of a tag in codeigniter controller?

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

Php - Sum up the numbers in an array one by one

PHP Imap , php 7.4.3 on mac osx catalina

Login if user is active using Laravel Breeze

Laravel Excel::store file empty after stored

php echo xml documents with header

PHP Slim Framework request using withAttribute error

Can I write PHP code across multiple lines per statement?

How do I do HTTP basic authentication using Guzzle?

About Contact Privacy policy Terms and conditions