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

105 lines
3.6 KiB
JavaScript

var ajax = new sack();
var IE = document.all?true:false;
var fieldLov
var spanLov
var titleLov
var curr_page
function execute_report() {
validate = validateForm(rep_param);
if (validate == 1) {
check = check_range(rep_param.TGL_AWAL, rep_param.TGL_AKHIR);
if (check == 1) {
document.getElementById("message").style.display = 'block';
document.getElementById("ACTION").value = 'rep';
var param = build_param(rep_param);
var group = document.getElementById("GROUP").options[document.getElementById("GROUP").selectedIndex].text;
curr_page = 1;
var data="action=rep";
data=data+"&param="+param;
data=data+"&page="+curr_page;
data=data+"&group="+group;
data=data+"&sid="+Math.random();
//alert(data);
ajax.requestFile = 'audit_trail_ajax.php?'+data;
ajax.onCompletion = repChanged;
ajax.runAJAX();
}
}
}
function repChanged(){
document.getElementById("parameterlist").style.display ='none';
document.getElementById("message").style.display ='none';
document.getElementById("report_out").style.display ='block';
document.getElementById("report_button").style.display ='block';
document.getElementById("rep_navigasi").style.display ='block';
document.getElementById("report_out").innerHTML = ajax.response;
document.getElementById("CURR_PAGE").value = curr_page;
ajax.reset();
}
function cancel_report() {
document.getElementById("parameterlist").style.display = 'block';
document.getElementById("report_out").style.display = 'none';
document.getElementById("report_button").style.display ='none';
document.getElementById("rep_navigasi").style.display ='none';
if (document.getElementById("ACTION").value == 'rep') {
location.reload(true);
}
}
function print_report() {
url = "./rep_print.php"
childWindow=showModalDialog(url,window,"dialogHeight: 470px; dialogWidth: 670px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; resizable: no; status: no")
}
function goFirst() {
var param = build_param(rep_param);
curr_page = 1;
var data="action=rep";
data=data+"&param="+param;
data=data+"&page="+curr_page;
data=data+"&sid="+Math.random();
ajax.requestFile = 'audit_trail_ajax.php?'+data;
ajax.onCompletion = repChanged;
ajax.runAJAX();
}
function goPrev() {
var param = build_param(rep_param);
curr_page = document.getElementById("CURR_PAGE").value;
curr_page = parseInt(curr_page)-1;
var data="action=rep";
data=data+"&param="+param;
data=data+"&page="+curr_page;
data=data+"&sid="+Math.random();
ajax.requestFile = 'audit_trail_ajax.php?'+data;
ajax.onCompletion = repChanged;
ajax.runAJAX();
}
function goNext() {
var param = build_param(rep_param);
curr_page = document.getElementById("CURR_PAGE").value;
curr_page = parseInt(curr_page)+1;
var data="action=rep";
data=data+"&param="+param;
data=data+"&page="+curr_page;
data=data+"&sid="+Math.random();
ajax.requestFile = 'audit_trail_ajax.php?'+data;
ajax.onCompletion = repChanged;
ajax.runAJAX();
}
function goLast() {
var param = build_param(rep_param);
curr_page = document.getElementById("JUM_PAGE").value;
var data="action=rep";
data=data+"&param="+param;
data=data+"&page="+curr_page;
data=data+"&sid="+Math.random();
ajax.requestFile = 'audit_trail_ajax.php?'+data;
ajax.onCompletion = repChanged;
ajax.runAJAX();
}