• 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 show selected value using javascript in laravel

Laravel - Browser displays message again when I press back button

Undefined variable in Laravel 8 project (php 7.4)

Can't call javascript alert alertify library from PHP

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

PHP Form Not Inserting

Group data in a multidimensional array based on two columns

jQuery Ajax Post with data

Add New Parameter to Existing URL using htaccess

Popup Window and PHP form

Mobile browsers are adding .html to filename on download

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

PHP - installing Xdebug on Mac with XAMPP (Unix File)

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

Creating Combinations of Elements

About Contact Privacy policy Terms and conditions