• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

22.1. JavaScript Basics

There are two parts to most JavaScript applications: the functions that tell the browser what to do, and references to these functions. Let's take the example of a simple web page that displays a linked document in a second window:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!---
function openWin(URL) {
aWindow=window.open(URL,"thewindow","toolbar=no,width=350,
height=400,status=no,scrollbars=yes,resize=no,menubar=no");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<P><A HREF="javascript:openWin('mozart.html');">Mozart</A></P>
<P><A HREF="javascript:openWin('beethoven.html');">Beethoven
</A></P>
<P><A HREF="javascript:openWin('wagner.html');">Wagner</A></P>
</BODY>
</HTML>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint