• 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

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

Laravel You requested 1 items, but there are only 0 items available

How can I get new CSRF token in LARAVEL by using ajax

CodeIgniter force_download is not working

Sagepay Error The Vendor failed to provide a RedirectionURL

Multiple order by in WooCommerce

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

Toggle between a textbox and a select using PHP

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

Laravel 5 controller sending JSON integer as string

How to load Codeigniter 4 lang file into an array variable

jQuery Ajax Post with data

How do I Post to .txt document before form submits

Natural ORDER in Laravel Eloquent ORM

Required field only if another field has a value, must be empty otherwise

About Contact Privacy policy Terms and conditions