반응형

 

<script>

function showProgressBar(TARGET_DIV)

{

 $('#oProgressBar').remove();

 var ds_html = '<center><table cellpadding=0 cellspacing=0><tr><td> <img src="/img/common/ing01.gif"></td></tr></table></center>';

 var progress = '<iframe width="255px" height="65px" id=oProgressBar style="position:absolute;width:255px;height:65px;" marginwidth="0" marginheight="0" scrolling="no" frameborder=0></iframe>';

 

 $('#'+TARGET_DIV).each(function(){

  this.insertAdjacentHTML("beforeEnd", progress);

  doc = oProgressBar.document;

  LEFT_PX = $(this).position().left+($(this).width()-255)/2;

  TOP_PX = $(this).position().top+($(this).height()-65)/2;

  return false;

 });

 

 doc.open("text/html");

 doc.write(ds_html);

 doc.close();

 

 $('#oProgressBar').css({top:TOP_PX+'px',left:LEFT_PX+'px'});

}

function hideProgressBar()

{

 var ele = parent.document.getElementById('oProgressBar');

 ele.parentNode.removeChild(ele);

}

</script>

 

<script>

showProgressBar('iframe_main');

</script>

 

<div id="iframe_main">

</div>

 

 

반응형