아이프레임 사이즈설정; 정보
아이프레임 사이즈설정;본문
<script language='JavaScript' type='text/javascript'>
function resizeFrame(iframeObj){
var innerBody = iframeObj.contentWindow.document.documentElement;
oldEvent = innerBody.onclick;
innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
// var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
if(document.all) var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
else var innerHeight = innerBody.offsetHeight;
iframeObj.style.height = innerHeight+'px';
// var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
iframeObj.style.width = 800 + 'px'; //가로 사이즈
if( !arguments[1] ) /* 특정 이벤트로 인한 호출시 스크롤을 그냥 둔다. */
this.scrollTo(1,1);
}
</script>
<iframe id="ifr" name="ifr" src="주소" width="800px" onload="resizeFrame(this)" scrolling="no" frameborder="0"></iframe>
소스는 이걸 사용했고요.
사진처럼 자동으로 사이즈설정이 잘되다가 ;
내용이 긴 게시물에 들어가면
그 길이만큼 사이즈가 ;;고정되어있어서 ;
어떻게 해야 자동으로 잘될까요?
고수님들 도와주세요.
function resizeFrame(iframeObj){
var innerBody = iframeObj.contentWindow.document.documentElement;
oldEvent = innerBody.onclick;
innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
// var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
if(document.all) var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
else var innerHeight = innerBody.offsetHeight;
iframeObj.style.height = innerHeight+'px';
// var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
iframeObj.style.width = 800 + 'px'; //가로 사이즈
if( !arguments[1] ) /* 특정 이벤트로 인한 호출시 스크롤을 그냥 둔다. */
this.scrollTo(1,1);
}
</script>
<iframe id="ifr" name="ifr" src="주소" width="800px" onload="resizeFrame(this)" scrolling="no" frameborder="0"></iframe>
소스는 이걸 사용했고요.
사진처럼 자동으로 사이즈설정이 잘되다가 ;
내용이 긴 게시물에 들어가면
그 길이만큼 사이즈가 ;;고정되어있어서 ;
어떻게 해야 자동으로 잘될까요?
고수님들 도와주세요.
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339

