• 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

Where do I need to place a hook for phpunit?

Open a popup box after receiving result from ajax

PHP to search within txt file and echo the whole line

Log a user out of a website when they put their computer to sleep

Display specific shipping method if woocommerce product has specific acf field value

Clients authentication and user authentication with laravel

Laravel update hasMany relationship using saveMany

Split a string array into pieces

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

javascript html popup window

Laravel Factory not calling callback 'afterCreating'

WAMP Virtual Host not working

Attempt to read property "view" on null when sending password reset email

how to make my own auto increment in php?

hidden INPUT value not available in $_POST

About Contact Privacy policy Terms and conditions