• 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

Add and update products to session cart in Laravel

php retrieve specific data onclick from database in a list format

Toggle between a textbox and a select using PHP

How can I get a div content in php

CSS file not imported in laravel blade view

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

java URL working on browser but not in client program

Cannot pass null argument when using type hinting

how to redirect the user back to desired URL after login page in PHP?

How to create a individual template for page or post in custom plugin?

Laravel no logout option from menu after successfull login

Facebook PHP SDK - will not logout properly

Auto increment id JSON

How to disable widget block editor of WordPress?

WHERE IN array binding in DB::raw laravel 5.4

About Contact Privacy policy Terms and conditions