묻고답하기

안녕하세요?

제가 여기 이 곳과 다른 곳에서도 게시물을 검색해봤지만, 도저히 답이 안나오더군요 ㅡㅜ
일단, 제가 만든 파일은 3개입니다.

1- 메인페이지. 표로 상,하단으로 구분. 상단과 하단에는 각각 iframe 을 써서 상단 메뉴 하단은 내용이 출력되게 했습니다.
2- 상단입니다. iframe name은 iframe1
3- 하단입니다. iframe name은 iframe2

2번 상단 메뉴부분에서 막힙니다. 간단한 구성인데, 메뉴부분에는 버튼과 간단한 텍스트 입력창을 만들었습니다.
버튼의 종류는 '뒤로' '앞으로' '이동' '새로고침'
텍스트입력창은 주소를 입력받는 곳입니다.
간단한 원리로... 입력창에 주소를 받으면 iframe2에 표시해주는 것입니다.

parent.iframe2.location=http://www.yahoo.co.kr 을 2번 파일 내용안에 넣거나 이와같은 형식으로
자바스크립트를 이용해서 1번 파일의 3번 으로 출력되게 했습니다.

여기까진 됩니다. 그런데......

문제는 history.back, history.go, location.reload() 이 세개가 말썽이네요...
parent.location.reload(), parent.history.back(-1), parent.history.go(1) 이렇게 쓴다면 이상은 없습니다.
단지, 새로 고치고 싶지 않은 내용이 있는 2번 부분까지도 함께 고쳐진다는 것이지요.

parent.iframe2.location.reload()
parent.iframe2.history.back(-1)
parent.iframe2.history.go(1)

이런식으로 쓰게 되면 오류가 납니다.
frames를 이용하면 frames[0] (첫번째 프레임) 은 reload()가 됩니다. 그런데,
frames[1] (두번째 프레임) 을 쓰게 되면 역시 또 오류가 나더군요.

모르겠습니다. 벌써 며칠째 고민하고 있는데, 여러군데를 다녀봐도 도저히 답이 안나오더군요...
몇몇 분들께서는 parent.프레임이름.location.reload() 를 쓰면 되지 않을까요... 하시는 분들도 계시던데..
말그대로.. 제 경우에는 안되더군요.

혹시나 해서 소스도 함께 올립니다.

1--------------------------------

<html>

<head>

<script language="javascript">

function hidebar()
{

        document.body.style.overflow="hidden"

}

</script>

</head>

<body onload="hidebar()" topmargin="0" leftmargin="0">

<center>

<table border="1" width="100%" height="100%" cellpadding="0" cellspacing="0">

<tr>
<td>
        <iframe src="tableup.htm" name="iframe1" width="100%" height="22" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
</td>
</tr>

<tr>
<td>
        <iframe src="about:blank" name="iframe2" width="100%" height="570" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>

</table>

</center>

</body>

</html>


2-----------------------------------

<html>

<head>

<style>
        .in{border:0}
</style>

<script language="javascript">

function gogogo()
{
  
        window.parent.iframe2.location="http://" + f.f1.value

}

function ntime()
{

        newtime=new Date()
        f.f2.value=newtime.getHours() + "시" + newtime.getMinutes() + "분" + newtime.getSeconds() + "초"
        setTimeout("ntime()",1000)

}
</script>

</head>

<body onload="f.f1.focus(),ntime()">

<center>

        <form name="f" onsubmit="gogogo()">
        <input type=button value="뒤로" onclick="parent.history.back(-1)">
        <input type=button value="앞으로" onclick="parent.history.go(1)">
        <input type=text name="f1" size=20>
        <input type=submit value="이동">
        <input type=button value="창닫기" onclick="window.parent.close()">        
        <input type=button value="새로고침" onclick="parent.location.reload()">        
        현재시각 :
        <input type=text name="f2" size=20 class=in>
        </form>

</center>

</body>

</html>