• 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 to upload mpdf file after generating to s3 bucket in php

Detect if PHP session exists

How update php.ini on a Mac OS X Mojave?

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

Reload parent page after submit in iframe

Symfony there are no commands defined in the "make" namespace

How to read laravel_session cookies saved in cookie memory of browser in client side?

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Check if a string contain multiple specific words

Auto increment id JSON

how to create html table in php

Check if string contains a value in array [duplicate]

how to make my own auto increment in php?

PHP SoapClient: set a namespace without prefix

How can I easily switch between PHP versions on Mac OSX?

About Contact Privacy policy Terms and conditions