크로스브라우징 iframe resize 정보
크로스브라우징 iframe resize본문
ie와 firefox에서 iframe이 잘되는 넘을 쓰면 크롬에서 안되고
크롬과 firefox에서 잘 되는 넘은 ie에서 안되고...ㅠ..ㅠ...
iframe resize - ie에서 크롬까지 잘 되는거 추천 좀 해주세요.
클럽에서 iframe을 쓰구 있는데, 이거 때문에 희머리 나고 있어요.
크롬과 firefox에서 잘 되는 넘은 ie에서 안되고...ㅠ..ㅠ...
iframe resize - ie에서 크롬까지 잘 되는거 추천 좀 해주세요.
클럽에서 iframe을 쓰구 있는데, 이거 때문에 희머리 나고 있어요.
댓글 전체
찾아보니 이런 소스가 나오네요. 다른 도메인 간에는 안되는거 아시죠?
<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>
</head>
<body>
<iframe width="700" id="the_iframe" onLoad="calcHeight();" src="iframe.html" scrolling="NO" frameborder="1" height="1"></iframe>
<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>
</head>
<body>
<iframe width="700" id="the_iframe" onLoad="calcHeight();" src="iframe.html" scrolling="NO" frameborder="1" height="1"></iframe>
음... 크롬의 캐취 방식이 달라서 생기는 문제에요. ㅠ..ㅠ...
감사합니다
옛날에 짜던건대 될지는 모르겠내요 확인안해봐서
http://topschool.co.kr/topboard/bbs/board.php?bo_table=toptip_html&wr_id=5&page=2
http://topschool.co.kr/topboard/bbs/board.php?bo_table=toptip_html&wr_id=5&page=2
로드할 때가 아니라, onchange일 때 변화가 다르게 나오는게 문제에요. ㅠ..ㅠ...
크롬의 방식이 다르데요.
크롬의 방식이 다르데요.
이글이글이글 님 감사합니다. 이 방법이 최고내요.
방금 해봤어요.
방금 해봤어요.