Register, Login, and Logout

This commit is contained in:
2026-05-13 19:27:59 -04:00
parent f591bdffb5
commit 86f94b7bf3
23 changed files with 737 additions and 25 deletions
+31
View File
@@ -0,0 +1,31 @@
// This script is designed to support at a minimum IE 6
//
// All menu functions are defined outside of initMenu.
//
// This is so I'm not duplicating functions between-
// checks for what browser we have
function doLogoutAction() {
var logoutForm = document.getElementById("Form_Auth_Logout");
logoutForm.submit();
}
// Once the page has fully loaded, connect each button to its code
function initMenu() {
var logoutButton = document.getElementById("Menu_Auth_Logout");
if(window.addEventListener) {
logoutButton.addEventListener("click", doLogoutAction);
} else {
logoutButton.attachEvent('onclick', doLogoutAction);
}
}
// Register load / onload event
if(window.addEventListener) {
window.addEventListener('load', initMenu);
} else if(window.attachEvent) {
window.attachEvent('onload', initMenu);
} else {
alert("Unsupported browser.");
}
+20
View File
@@ -0,0 +1,20 @@
// really simple IE6 compatible post function
function PostToEndpoint(url, params) {
var form = document.createElement("form");
form.method = "POST";
form.action = url;
for (var key in params) {
if (params.hasOwnProperty(key)) {
var input = document.createElement("input");
input.type = "hidden";
input.name = key;
input.value = params[key];
form.appendChild(input);
}
}
document.body.appendChild(form);
form.submit();
}