I have this script which updates an entry in the database.
document.getElementById(\'D1-on\').addEventListener(\'click\', function () {