• 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

get folder directory from input type file - PHP

Querying only one row from a one to many relationship laravel

How can I get new CSRF token in LARAVEL by using ajax

What is my SQL missing?

selected value from the listbox in php

Popup Window and PHP form

Using PHP to connect to a remote MSSQL database

PHP only Hit Counter?

Ajax GET request fails in laravel 8

Backend cannot be reached after Typo3 login screen

The difference when using if statement true === something() vs something() === true [duplicate]

Failing validation doesn't stop code execution in livewire component

MISSING UPDATES FOR: MEDIA Drupal 9

Laravel - Browser displays message again when I press back button

possible options to create pdf file using html elements to generate invoice in php and codeigniter

About Contact Privacy policy Terms and conditions