• 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

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT "INOUT")

Wordpress how to get the post thumbnail inside a figure tag

Reload parent page after submit in iframe

Creating live search with AJAX and CodeIgniter

Get number of working days between two dates in PHP [duplicate]

php code to send checkbox form results to email

Laravel Model save() & update() Not Saving

Converting alphabet letter to alphabet position in PHP [duplicate]

Batch request Google Calendar php API

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

Laravel lang slug in url

generate an Excel file using PHP

IlluminateDatabaseQueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

Return new collection without modifying original collection

Transform array, set each array element with parent key php

About Contact Privacy policy Terms and conditions