Open two pages with 1 click (Rated 5)Description:
Using JavaScript you can display two pages with one click, for example if you have a frame with index of hyperlinks and a main information page you can update the index to expand the options while displaying the requested information in the main frame. Code starts here
<!--
this example assumes the page from two frames, frameIndex and frameContent
-->
<html>
<head>
<title>Your Title</title>
<!--
display in the frameContent by default
-->
<base target="frameContent">
</head>
<body>
<!--
build the index table however you like
-->
<table>
<tr>
<!-- update indexFrame and contentFrame -->
<td><a language="JavaScript" href="./page_to_display_in_frameIndex.htm" target="_self" onClick="parent.frameContent.location.href='./page_to_display_in_frameContent.htm'">Index Item 2</a></td>
<!-- update contentFrame only -->
<td><a href="./page_to_display_in_frameContent_only.htm" >Index Item 2</a></td>
</tr>
</table>
</body>
</html>
Last Edited: 1046135445
Submitted by Mat on 25-02-2003 1:10 |