• 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

Yii Ajax Submit button

Dynamic table in HTML using MySQL and php

Fetch files from next cloud storage and display in Laravel website

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

CodeIgniter 4: Like and Dislike Functionality

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Extract string between first whitespace and last whitespace in php

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

PHP: Print caught exception like Xdebug

add " ? " in url via htaccess RewriteRule

Comma separated list from array with "and" before last element

How to get total pages of PDF with FPDF?

Undefined variable in Laravel 8 project (php 7.4)

Why "Class 'GuzzleHttpClient' not found" even after Installing it in Laravel?

How to fix Call to undefined method AppModelsTableName::factory?

About Contact Privacy policy Terms and conditions