• 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

Issue saving card for customer

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

how to hide previous markers when new markers added in google map javascript api

Merge column values from two arrays to form an indexed array of associative arrays

Unable to uninstall brew php from homebrew

How to write PHP in XSLT

Issue with laravel eloquent model property

Spam Filter in Contact Form

Fatal error: [] operator not supported for strings

how to get value from array in laravel

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

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

301 Redirect to remove query string on homepage only

How to redirect to another page after n seconds in wordpress without using javascript?

How to add class name to an existing tag in php

About Contact Privacy policy Terms and conditions