• 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

Using PHP to connect to a remote MSSQL database

How can I create a Download Page with post php method?

Unable to create lockable file - Laravel 8 & PHP 8

Change user role if checkout custom checkbox is checked in WooCommerce

I want to display a sweetalert after the inserting of data in my database

PHP file_get_contents function

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Override default Auth routes in Laravel 7

Transform array, set each array element with parent key php

Laravel set default language not working

How do I remove this delivery notification from here?

Symfony Error: "An exception has been thrown during the rendering of a template"

hidden INPUT value not available in $_POST

About Contact Privacy policy Terms and conditions