• 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

Convert PHP array into HTML tag attributes separated by spaces

How to set a domain name with php artisan serve

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Use same method for inertia response and json response Laravel Jetstream

How to get AJAX to post on second page?

Convert date and time to Jalali in Laravel

How to put php code inside opening and closing shortcodes

PHPS source file - 403 Forbidden You don't have permission to access this resource

PHP sort array of objects by two properties

getting error while enter Command => php artisan route:list

Adding the custom page with add_menu_page function on Wordpress

Star rating with half star support

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

How can I format this number correctly using PHP?

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

About Contact Privacy policy Terms and conditions