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;
}
}
'SAP > BSP' 카테고리의 다른 글
BSP 페이지 생성할 때 유용한 것들 (0) | 2010.07.16 |
---|---|
BSP - 브라우저 우측 상단 X버튼에 관해 (0) | 2010.07.15 |
BSP - ZIP 파일 생성(여러개 파일을 묶어서 다운로드) (0) | 2010.04.09 |
BSP - 엑셀 다운로드 예시 (0) | 2010.04.08 |
BSP - 엑셀다운로드 (0) | 2010.04.08 |