index.php 파일에서 게시판을 바로 불러와서사용하려고 하는데....
본문
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="3000"width="100%" colspan="3" align="center" valign="top">
<iframe name='ifmain' width='100%' height='100%' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='no' src='/bbs/board.php?bo_table=P01'></iframe>
</td>
</tr>
</table>
해당 소스를 사용합니다.
그런데 height="3000" 이걸 100%로 화면이 줄어서 잘리더라구요. 그래서 3000으로 했는데
원래 무제한은 100% 아닌가요?
첨부는 100%로 했을때 캡쳐입니다. 전체가 다 보일줄 알았는데 그렇지가 않네요.
왜 그런지 모르겠습니다. 위 아래가 짤린거에요.
-----------------------추가--------------------------
해결 했는데 스크립트를 추가하면 되는거였네요.
<!--- 아이프레임자동으로늘어나는자바스크립 --->
<script language="JavaScript">
function reSize() {
try {
var objBody = auto_iframe.document.body;
var objFrame = document.all["auto_iframe"];
ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
objFrame.style.height = ifrmHeight + "px";
}
catch(e) {}
}
function init_iframe() {
reSize();
setTimeout('init_iframe()',1)
}
init_iframe();
</script>
<!--- 아이프레임자동으로늘어나는자바스크립 끝--->
<!-- 게시판 아이프레임-->
<iframe src="게시판주소" frameborder="0" width="100%" allowtransparency="true"
name="auto_iframe" id="auto_iframe" marginwidth="0" marginheight="0" scrolling="No"></iframe>
<!-- 게시판 끝-->
<tr>
<td height="3000"width="100%" colspan="3" align="center" valign="top">
<iframe name='ifmain' width='100%' height='100%' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='no' src='/bbs/board.php?bo_table=P01'></iframe>
</td>
</tr>
</table>
해당 소스를 사용합니다.
그런데 height="3000" 이걸 100%로 화면이 줄어서 잘리더라구요. 그래서 3000으로 했는데
원래 무제한은 100% 아닌가요?
첨부는 100%로 했을때 캡쳐입니다. 전체가 다 보일줄 알았는데 그렇지가 않네요.
왜 그런지 모르겠습니다. 위 아래가 짤린거에요.
-----------------------추가--------------------------
해결 했는데 스크립트를 추가하면 되는거였네요.
<!--- 아이프레임자동으로늘어나는자바스크립 --->
<script language="JavaScript">
function reSize() {
try {
var objBody = auto_iframe.document.body;
var objFrame = document.all["auto_iframe"];
ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
objFrame.style.height = ifrmHeight + "px";
}
catch(e) {}
}
function init_iframe() {
reSize();
setTimeout('init_iframe()',1)
}
init_iframe();
</script>
<!--- 아이프레임자동으로늘어나는자바스크립 끝--->
<!-- 게시판 아이프레임-->
<iframe src="게시판주소" frameborder="0" width="100%" allowtransparency="true"
name="auto_iframe" id="auto_iframe" marginwidth="0" marginheight="0" scrolling="No"></iframe>
<!-- 게시판 끝-->
답변 2
auto는 안되려나요?
index.php의 용도를 특정게시판으로 틔우고 싶으시면 프레임 쓰지 마시고
그냥 해당 게시판으로 자동 넘기세요..
해당 게시판 상단이나 하단은 원하는 대로 꾸미면 되니까요.
index.php화일 내용을
<meta http-equiv="refresh" content='0;url=bbs/board.php?bo_table=P01'>이렇게 고치거나
<script>
<!--
location.href="bbs/board.php?bo_table=P01";
-->
</script>
또는
<?php
header("location:bbs/board.php?bo_table=P01");
?>
하시면 될 것 같네요.
그냥 해당 게시판으로 자동 넘기세요..
해당 게시판 상단이나 하단은 원하는 대로 꾸미면 되니까요.
index.php화일 내용을
<meta http-equiv="refresh" content='0;url=bbs/board.php?bo_table=P01'>이렇게 고치거나
<script>
<!--
location.href="bbs/board.php?bo_table=P01";
-->
</script>
또는
<?php
header("location:bbs/board.php?bo_table=P01");
?>
하시면 될 것 같네요.
답변을 작성하시기 전에 로그인 해주세요.