• 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 load Codeigniter 4 lang file into an array variable

PHP mail function is sending blank message body

Star rating with half star support

Reload parent page after submit in iframe

How to create a video stream from a single dynamic image in PHP

Insert database rows from columns of data from associative array of indexed arrays

Symfony - "framework.test" config is not set to true

How do I pass the dynamic output of a php variable or php function to a CSS variable?

how to loop through json response data using ajax jquery?

enable Apache http Authorization header

How to set a domain name with php artisan serve

Laravel - Browser displays message again when I press back button

Issue saving card for customer

get data-value with variable value

how to create html table in php

About Contact Privacy policy Terms and conditions