• 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

str_replace or preg_replace random number from string

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

How to Make Laravel Eloquent "IN" Query?

PHP each() function replacement

Warning: A non-numeric value encountered

Ajax GET request fails in laravel 8

Redirect to previous page with php

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

Get image type from base64 encoded src string

Laravel update hasMany relationship using saveMany

Split a string array into pieces

PHP: PDO + CSV export not downloading (headers issue?)

PHP contact form configuration [duplicate]

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Google Gmail API - How to login programatically?

About Contact Privacy policy Terms and conditions