• 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 can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

Shopify password update using Shopify API

Redirect to previous page with php

how to create html table in php

PHP DOTENV unable to load env vars

If action is on a different page do I use fwrite function

I cannot create a auto generated date time in mysql workbench

could not find driver Debian SQL Server PHP

php script to delete files older than 24 hrs, deletes all files

Sort multidimensional array by column value within a column

Yii2: How do I debug console commands?

Google Calendar API batch request PHP

PHPS source file - 403 Forbidden You don't have permission to access this resource

Find out the name of the last script that included the current one

Saving Data from form to database using AngularJS and php

About Contact Privacy policy Terms and conditions