This live demo modernizes the original inline student-record editor. The demo backend validates the data and returns JSON; it does not write to the production student table.
| ID | Name | Class | Sex | Mark | Action |
|---|---|---|---|---|---|
| 1 | John Deo | Four | female | 75 | |
| 2 | Max Ruin | Three | male | 85 | |
| 3 | Arnold | Three | male | 55 | |
| 4 | Krish Star | Four | female | 65 |
$( "#student-table" ).on(
"click",
".edit-record",
function () {
const $button = $( this );
const $row =
$button.closest( "tr" );
if (
$button.text() === "Edit"
) {
enterEditMode(
$row,
$button
);
return;
}
submitRow(
$row,
$button
);
}
);
$.post(
"display-submit.php",
data,
null,
"json"
)
.done(function ( response ) {
if (
response.value.status ===
"success"
) {
renderRow(
$row,
response.data
);
}
});
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.