dwh/js/script_incl_js.js
Daeng Deni Mardaeni 5321a5434b first commit
2023-10-02 17:26:17 +07:00

58 lines
1.2 KiB
JavaScript

function CheckSessionExpiry() {
var OK = false;
var match ='';
var re = /(EXPIRED)/;
var x = window.dialogArguments;
// str = x.cntdwn.innerHTML;
str = top.navigation.document.all("cntdwn").innerHTML;
match = re.exec(str);
if (match == null) {
OK = false;
} else {
OK = true;
ShowErrorBox("Your login session is expired. Please logout and re-login.","Session Expired");
}
return OK;
}
function CheckSessionExpiryFromChild() {
var OK = false;
var match ='';
var re = /(EXPIRED)/;
var x = window.dialogArguments;
// str = x.cntdwn.innerHTML;
str = x.top.navigation.document.all("cntdwn").innerHTML;
match = re.exec(str);
if (match == null) {
OK = false;
} else {
OK = true;
ShowErrorBox("Your login session is expired. Please logout and re-login.","Session Expired");
}
return OK;
}
function loadPage(frame,page) {
frame.location.href = page;
}
function toUpper(field) {
field.value = field.value.toUpperCase()
}
function strToUpper(strval){
var result = strval.toUpperCase();
return result;
}
function makeHash(loginid,passwd)
{
var id = strToUpper(loginid);
result = calcMD5(id + passwd);
return result;
}
function redirect(location){
window.location = location;
}