게시판을 iframe으로 넣다보니 include를 할려는데 안되네요
홈페이지를 통으로 만들고, iframe으로 자동으로 길이 늘리는 소스를 넣다보니 외부에서 게시판의 상세내용을 링크할려고 하니 iframe밖의 이미지들은 전혀 안보이고, iframe내의 게시판 소스만 달랑 나오네요..
이걸 head.php와 tail.php로 짤라서 한다는데 어떻게 해야할까요?
예를 들어 올려놓을텐데, 짤라서 설명해주시면 감사하겠습니다.
<!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>Untitled Document</title>
</head>
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>
<body>
내용....은 여기에 있고... 아래의 주소는 iframe으로 구분한것입니다.
iframe을 사용하지 않고, 위의 자바 스크립트소스랑 다 포함해서 head와 tail을 잘라서 어떻게 해야 하는지 잘 모르겠네요.
잘라서 어떻게 어디에 넣어야 하는건가요?
<iframe width=100% id="the_iframe" onLoad="calcHeight();" src="http://naver1.com/gnuboard4/bbs/board.php?bo_table=archive" scrolling="NO" frameborder="0" height="0"></iframe>
</body>
</html>
이걸 head.php와 tail.php로 짤라서 한다는데 어떻게 해야할까요?
예를 들어 올려놓을텐데, 짤라서 설명해주시면 감사하겠습니다.
<!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>Untitled Document</title>
</head>
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>
<body>
내용....은 여기에 있고... 아래의 주소는 iframe으로 구분한것입니다.
iframe을 사용하지 않고, 위의 자바 스크립트소스랑 다 포함해서 head와 tail을 잘라서 어떻게 해야 하는지 잘 모르겠네요.
잘라서 어떻게 어디에 넣어야 하는건가요?
<iframe width=100% id="the_iframe" onLoad="calcHeight();" src="http://naver1.com/gnuboard4/bbs/board.php?bo_table=archive" scrolling="NO" frameborder="0" height="0"></iframe>
</body>
</html>
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 5개
아이프레임이 끝난 후의 모든 소스를 tail에 넣어주면 됩니다.
맞다면, 게시판을 iframe을 사용할때처럼 자연스럽게 이미지와 함께 나올 수 있게 불러올땐 어떻게 해야 하나요?
head.html만 불러오면 게시판 전까지고, tail만 불러오면 게시판 없이 따로 노는데...게시판을 head와 tail중간에 나와야 하는데 어떻게 해야 하나요?
head와 tail을 넣고 게시판을 불러올때는 어떤 화일을 불러와야 하나요?
즉, 어떤 화일을 불러야만 head와 tail이 모두 포함되어 화면에 잘 나오게 되나요?
head.html
게시판
tail.html
이렇게 적용이 됩니다.