I've recently started leveraging jeditable for a project, and the documentation, which looks pretty straightforward does not appear to be submitting. The paragraph does become editable upon clicking, but when clicking 'Enter' the text does not change and no information is submitted to edit_test.php. Any and all help would be appreciated. I checked the JS console and error I see is:
- POST http://localhost:8888/edit_test.php 500 (Internal Server Error)
as well as:
- jquery-3.5.1.min.js:2 XHR failed loading: POST "http://localhost:8888/edit_test.php"
Code below:
Relevant HTML
<p id="edit_test">Please edit me!</p>
JS
$(document).ready(function() {
$('#edit_test').editable('edit_test.php');
});
edit_test.php is as follows:
<?php
$edit = 'Do not edit me!';
if ($_POST['id'])
{
$edit = $_POST['value'];
}
echo $edit;
?>
Thanks in advance!
I figured this out, and, though I think I probably asked the question poorly, I thought I'd post in case this helps anyone in the future.
jeditable references a "save.php" in its documentation, but never provides an example of what a basic "save.php" should contain. In my example, I simply needed the server page to display the posted 'value' parameter. In other words:
Easy peasy.