• 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

Laravel csrf token mismatch for ajax POST Request

Upload a file Using PHP and JavaScript

How to loop sql table data inside a html table

PHPExcel file download using AJAX call

Trying to iterate over a mongodb cursor twice - failing

PHP password_verify

Refresh specific HTML content that retrieves data from MySQL

Creating live search with AJAX and CodeIgniter

500 Internal Server Error on Ajax request. Not sure the origin of the problem

How to create a individual template for page or post in custom plugin?

woocommerce get_order_report_data to show order_item_id

ORA-12546: TNS:permission denied error connection to remote oracle server

How to render html from a @foreach loop in a textarea

Create tags in laravel post publishing

Select option menu read from database and use it's values

About Contact Privacy policy Terms and conditions