///////////// 미리보기창 버튼
<input type="button" value="미리보기" onclick="openPreview(frm.content.value,'','')">




/////////// 부모창 소스
// 미리보기 - 객체
function clsPreview(val) {
    this.m_val = val;
    this.openPreview = openPreview;
    this.openPreview_SetData = openPreview_SetData;
}
// 미리보기 - 창띄우기
function openPreview(val, pWidth, pHeight) {
    clsPreview(val);
    if (pWidth == "") { pWidth = "750";}
    if (pHeight == "") { pHeight = "600";}
    openwin("/common/popupPreview.asp","windowPreview",pWidth,pHeight,"yes");  
}
// 미리보기 - 창에 데이타 넘기기
function openPreview_SetData(opObj) {
    this.m_val = this.m_val.replace(/n/gi,"<br>");
    opObj.innerHTML = this.m_val
}





////// 자식창 소스
<html>
<head>
<title>미리보기</title>
<script language="javascript" src="/_script/common.js"></script>
<script language="javascript">
    function window.onload() {
        opener.openPreview_SetData(document.all.i_preview);
    }
</script>
<body>
<div id="i_preview">

</div>
</body>
</html>

+ Recent posts