Inline Record Edit Demo

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.

Choose a row to edit.
IDNameClassSexMarkAction
1 John Deo Four female 75
2 Max Ruin Three male 85
3 Arnold Three male 55
4 Krish Star Four female 65

Delegated Edit Handler Top ↑

$( "#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
        );
    }
);

Update with JSON Top ↑

$.post(
    "display-submit.php",
    data,
    null,
    "json"
)
.done(function ( response ) {
    if (
        response.value.status ===
        "success"
    ) {
        renderRow(
            $row,
            response.data
        );
    }
});

← Full record-edit tutorial






plus2net.com






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer