SAP/BSP
BSP - Process bar
손여사아들
2010. 4. 13. 17:16
function doProgressBar(){
if(!document.all.sapProgressBarWindowId){
var height=0;var width=0;var left=0;var top=0;
height=document.body.clientHeight;
width=document.body.clientWidth;
top=document.body.scrollTop;
left=document.body.scrollLeft;
width=825;
height=572;
left+=(width - 333) / 2;
top+=(height - 575) / 2;
// top+=(height - 248) / 2;
var progressBar = "<div id='sapProgressBarWindowId' style='position:absolute;left:" + left + ";top:" + top + ";width:238;height:20;display:block;z-index:999999;'>" +
// var progressBar = "<div id='sapProgressBarWindowId' style='position:absolute;left:" + left + ";top:" + top + ";width:333;height:141;display:block;z-index:999999;'>" +
"<img src='이미지 주소'>" +
"</div>";
var bodyId = document.getElementsByTagName("body")[0];
bodyId.insertAdjacentHTML("afterBegin", progressBar);
}else{
document.all.sapProgressBarWindowId.style.display = "block";
}
}
function stopProgressBar(){
if(document.all.sapProgressBarWindowId){
document.all.sapProgressBarWindowId.style.display = "none";
}
isSubmit = false;
}
ex)
var isSubmit = false;
function doubleClickProtect(){
if(isSubmit){
return true;
}
else{
doProgressBar();
return false;
}
}
if(!document.all.sapProgressBarWindowId){
var height=0;var width=0;var left=0;var top=0;
height=document.body.clientHeight;
width=document.body.clientWidth;
top=document.body.scrollTop;
left=document.body.scrollLeft;
width=825;
height=572;
left+=(width - 333) / 2;
top+=(height - 575) / 2;
// top+=(height - 248) / 2;
var progressBar = "<div id='sapProgressBarWindowId' style='position:absolute;left:" + left + ";top:" + top + ";width:238;height:20;display:block;z-index:999999;'>" +
// var progressBar = "<div id='sapProgressBarWindowId' style='position:absolute;left:" + left + ";top:" + top + ";width:333;height:141;display:block;z-index:999999;'>" +
"<img src='이미지 주소'>" +
"</div>";
var bodyId = document.getElementsByTagName("body")[0];
bodyId.insertAdjacentHTML("afterBegin", progressBar);
}else{
document.all.sapProgressBarWindowId.style.display = "block";
}
}
function stopProgressBar(){
if(document.all.sapProgressBarWindowId){
document.all.sapProgressBarWindowId.style.display = "none";
}
isSubmit = false;
}
ex)
var isSubmit = false;
function doubleClickProtect(){
if(isSubmit){
return true;
}
else{
doProgressBar();
return false;
}
}