first.htm
<HTML>
<HEAD>
<TITLE>Links and Anchors: Window 1</TITLE>
</HEAD>
<BODY>
<SCRIPT>
window2=open("second.htm","secondLinkWindow","scrollbars=yes,width=250, height=400"
function linkToWindow(num) {
if (window2.document.anchors.length > num)
window2.location.hash=num;
else
alert("Anchor does not exist!"
}
</SCRIPT>
<B>Links and Anchors</B>
<FORM>
<P>Click a button to display that anchor in window #2
<P>
<INPUT TYPE="button" VALUE="0" NAME="link0_button" onClick="linkToWindow(this.value)">
<INPUT TYPE="button" VALUE="1" NAME="link0_button" onClick="linkToWindow(this.value)">
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.