아이프레임으로 자동 조절을 해봤는데요. 정보
아이프레임으로 자동 조절을 해봤는데요.
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : http://shop.123korea.com/123.php
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
define("_INDEX_", TRUE);
$g4[title] = "";
include_once("$g4[path]/s_head.php");
?>
<script language="JavaScript" src="<?=$g4[path]?>/js/shop.js"></script>
<table width=100% cellpadding=0 cellspacing=0 height="100%">
<tr>
<td valign=top>
<table width=100% cellpadding=0 cellspacing=0 height="100%">
<tr>
<td>
<p align="center">
<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 = 746 + 'px'; //가로 사이즈
if( !arguments[1] ) /* 특정 이벤트로 인한 호출시 스크롤을 그냥 둔다. */
this.scrollTo(1,1);
}
</script>
<iframe id="ifr" name="ifr" src="http://123korea.com/user/pic_list.php?h_cseq=42&h_ctype=&h_ctitle=%B8%ED%C8%AD&h_csubtle=%B8%ED%C8%AD&h_author=%BA%F3%BC%BE%C6%AE+%B9%DD+%B0%ED%C8%E5&h_auth_seq=2&h_gpart=&h_pay_gu=9&h_best_gu=0" width="900px" onload="resizeFrame(this)" scrolling="no" frameborder="0"></iframe>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<BR>
<?
include_once("$g4[path]/s_tail.php");
?>
이런식으로 아이프레임을 사용해 봤는데요.
가로는 되는데 세로 길이가 늘어나지가 않는데 무엇이 잘 못 되었을까요?
기존 소스를 이용하여 작업하였는데.
조금 어렵네요^^;;
그리고 혹시...
웹페이지를 인크루드 하는 방법도 있는지 궁금합니다.
오류 주소 : http://shop.123korea.com/123.php
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
define("_INDEX_", TRUE);
$g4[title] = "";
include_once("$g4[path]/s_head.php");
?>
<script language="JavaScript" src="<?=$g4[path]?>/js/shop.js"></script>
<table width=100% cellpadding=0 cellspacing=0 height="100%">
<tr>
<td valign=top>
<table width=100% cellpadding=0 cellspacing=0 height="100%">
<tr>
<td>
<p align="center">
<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 = 746 + 'px'; //가로 사이즈
if( !arguments[1] ) /* 특정 이벤트로 인한 호출시 스크롤을 그냥 둔다. */
this.scrollTo(1,1);
}
</script>
<iframe id="ifr" name="ifr" src="http://123korea.com/user/pic_list.php?h_cseq=42&h_ctype=&h_ctitle=%B8%ED%C8%AD&h_csubtle=%B8%ED%C8%AD&h_author=%BA%F3%BC%BE%C6%AE+%B9%DD+%B0%ED%C8%E5&h_auth_seq=2&h_gpart=&h_pay_gu=9&h_best_gu=0" width="900px" onload="resizeFrame(this)" scrolling="no" frameborder="0"></iframe>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<BR>
<?
include_once("$g4[path]/s_tail.php");
?>
이런식으로 아이프레임을 사용해 봤는데요.
가로는 되는데 세로 길이가 늘어나지가 않는데 무엇이 잘 못 되었을까요?
기존 소스를 이용하여 작업하였는데.
조금 어렵네요^^;;
그리고 혹시...
웹페이지를 인크루드 하는 방법도 있는지 궁금합니다.
댓글 전체
일반 게시판 하나 잡아놓고 링크로 *.php 파일을 받아서 뿌리세요
include() 형식으로 보여주면 되겠죠
간단하게 코딩하면
include_once ("$g4[path]/~~ 경로/{$view['wr_link1']} ~~ 형식이 되겠죠..
그리고 iframe 세로길이 오토사이징은 쉽지 않은 일입니다. 브라우저를 너무 탑니다.
include() 형식으로 보여주면 되겠죠
간단하게 코딩하면
include_once ("$g4[path]/~~ 경로/{$view['wr_link1']} ~~ 형식이 되겠죠..
그리고 iframe 세로길이 오토사이징은 쉽지 않은 일입니다. 브라우저를 너무 탑니다.