// Manage the Add New Control button function AddNewControl(el) { url = el.getAttribute('data-url'); window.location.assign(url); } function initPage() { // Manage the BACK button document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) { evt.preventDefault(); window.history.back(); }); // Disable the back button if there is nothing to go back to $j('#backBtn').prop('disabled', !document.referrer.length); // Manage the REFRESH Button document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) { evt.preventDefault(); window.location.reload(true); }); } $j(document).ready(function() { initPage(); });