iframe자동높이조절문제...(파이어폭스만이상하게 나오네요)ㅠㅠ

· 2011-04-06 (수) 16:24:40 · 4377 · 2

<script language="javascript">
function calcHeight(FrameName) {
   var the_height= document.getElementById(FrameName).contentWindow.document.body.scrollHeight;
document.getElementById(FrameName).height=the_height;
}
</script>

<iframe id="board_products_id" frameborder="1" src="1.php" onLoad="calcHeight('board_products_id')" width="100%" height="100%" scrolling="no" title="board_products" ></a>
</iframe>

이렇게 쓰고있는데요..
IE, 크롬이나 다른곳은 정상적으로 나오는데..
파이어폭스가 자동조절이 않됩니다.(파폭 버전 3.6.16)
무엇이 문제라서..ㅠㅠ
고수님들 한수갈켜주세요..

|

댓글 2개

$('#board_products_id').load(function() {
$(this).height($(this).contents().find('body')[0].scrollHeight);
});

어차피 불러온 덩치큰놈 써먹어야죠
간단히 아래처럼 해보세요
<iframe src="1.php" name="content" onload="this.height=content.document.body.scrollHeight;" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="no" scrolling="no"></iframe>
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

202,899건
+
제목 글쓴이 날짜 조회
11-04-06 조회 1,942
11-04-06 조회 1,444
11-04-06 조회 1,923
11-04-06 조회 2,309
11-04-06 조회 2,186
11-04-06 조회 2,128
11-04-06 조회 1,971
11-04-06 조회 1,981
11-04-06 조회 4,378
11-04-06 조회 2,139
11-04-06 조회 2,127
11-04-06 조회 3,542
11-04-06 조회 2,747
11-04-06 조회 1,825
11-04-06 조회 2,812
11-04-06 조회 2,189
11-04-06 조회 1,945
11-04-06 조회 1,931
11-04-06 조회 1,566
11-04-06 조회 1,774