JavaScript Tip of the Week for January 6, 1997: The Universal Remote | Source Code | WebReference

JavaScript Tip of the Week for January 6, 1997: The Universal Remote | Source Code


JavaScript Tip of the Weekfor January 6, 1997: Source Code: The Universal Remote

The basic page that the remote will be launched from:

<HTML>
<HEAD><TITLE>Remote Launching Page</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
<!--
// The remote launching code.
function makeRemote() {
remote = window.open("","remotewin","width=350,height=400");
remote.location.href = "http://webreference.com/javascript/970106/remote.html";
    if (remote.opener == null) remote.opener = window; 
remote.opener.name = "opener";
}
//-->
</SCRIPT>
</HEAD>
<BODY>
This is a Page
<BR>
<A HREF = "javascript:makeRemote()">Open Remote</A>
</BODY>
</HTML>
The basic remote in "remote.html":
<HTML>
<HEAD><TITLE>Remote</TITLE>
</HEAD>
<BODY>
The Amazing Remote 
<P>
Links directed to the opener:
<BR>
<A TARGET = "opener" HREF = "index.html">Front Page</A>
<A TARGER = "opener" HREF = "tip_week_past.html">Tip Repository</A>
<BR>
Put a Form anywhere on this page, just make sure its target is "opener".
</BODY>
</HTML>