by ngpgeeta on Sun Nov 26, 2006 1:14 pm
Lets say we have an html page called one.html containing three buttons.
Another page say two.html has some initial information about one.html.
Both pages are in same window but in two frames. The frameset code will be like this:
<HTML>
<HEAD>
</HEAD>
<frameset rows="50,*" border=0>
<frame name="f1" src="one.html">
<frame name="f2" src="two.html">
</frameset>
</HTML>
The code for one.html is say like this:
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function change()
{
parent.f2.document.location.href="three.html"
}
function change1()
{
parent.f2.document.location.href="two.html"
}
function change2()
{
parent.f2.document.location.href="four.html"
}
</script>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="">
<INPUT TYPE="button" name="n1" value=" first" onClick="change()" >
<INPUT TYPE="button" name="n2" value=" second" onClick="change2()" >
<INPUT TYPE="button" name="hide" value="hide" onClick="change1()" >
</FORM>
</BODY>
</HTML>
When button first is pressed, it will open three.html in bottom frame.
When button second is pressed, it will open four.html in bottom frame.
When button hide is pressed, it will open two.html again in the bottom frame. This will give the look as if we have closed three.html or four.html
Hope, this solves your problem.