index.php 파일에서 게시판을 바로 불러와서사용하려고 하는데....

index.php 파일에서 게시판을 바로 불러와서사용하려고 하는데....

QA

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>
 <!-- 게시판 끝-->

이 질문에 댓글 쓰기 :

답변 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");
?>

하시면 될 것 같네요.

네 감사합니다. 한번 살펴 보겠습니다.

--- 해더 파일---
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');

if (G5_IS_MOBILE) {
    include_once(G5_MOBILE_PATH.'/head.php');
    return;
}

// 상단 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
if ($config['cf_include_head']) {
    if (!@include_once($config['cf_include_head'])) {
        die('기본환경 설정에서 상단 파일 경로가 잘못 설정되어 있습니다.');
    }
    return; // 이 코드의 아래는 실행을 하지 않습니다.
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>컴싹</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
}
-->
</style></head>

<body>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="100%" width="100%" colspan="3" align="center" valign="top">

답변을 작성하시기 전에 로그인 해주세요.
전체 13
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT