• 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

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

What is PHP's equivalent of JavaScript's "array.every()"?

PHP header location absolute URL

Laravel Database Strict Mode

PHP's array_map including keys

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

Show only featured products in Woocommerce shop page

How to create laravel storage symbolic link for production or sub domain system?

How do I call a php file with axios?

Hide email address with stars (*)

MySQL - Connection failed: No route to host

Results page in other window

Printing more than one array using print_r or any other function in php

add_action() function in wordpress not working [duplicate]

How do I remove this delivery notification from here?

About Contact Privacy policy Terms and conditions