• 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 do I refresh a DIV content?

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

Saving Data from form to database using AngularJS and php

phpseclib 2.0 can not use Composer to create autoload

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

Add rows to Single product Additional information table in WooCommerce 3.6

Can I write PHP code across multiple lines per statement?

Don't show recurring price for WooCommerce subscriptions worth 0$

How to loop a tree array with unknown depth and get array blocks?

How can I make a full text index of the column?

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

How to reset Laravel AuthManager/guards in between API calls in tests?

how to make my own auto increment in php?

Get data from accuweather api url

About Contact Privacy policy Terms and conditions