JavaScriptTemplate.html Shows the basic structure of how
you insert SCRIPT elements into the BODY part of an HTML document.
FirstScript.html A very simple page where JavaScript builds
part of the HTML.
ShowInfo.html
A page that shows information about the page and browser.
Illustrates that JavaScript can generate different HTML
in different situations.
DontClick.html
A simple illustration that JavaScript can be
used to monitor user events, not just to dynamically build HTML.
ForIn.html An illustration of the use of the
for(field in object) construct.
Strawberries.html. Illustrates that in JavaScript you can look up
the browser window size and adjust image and font sizes appropriately
(Nescape 4 only).
Uses images Strawberry1.gif and
Stawberry2.gif.
Plugins.html
Shows how JavaScript can access information about your
browser's available plugins.
ImageButton.html
Using JavaScript to animate images, you can create an image button
that, when clicked, takes you to a specific URL and
is briefly displayed in inverse video when clicked.
HighPeaks.html
Illustrates the use of JavaScript to
"highlight" clickable images when they are under the mouse.
Uses the following HTML files and images:
HighPeaksNavBar.html
This frame cell has the actual JavaScript image-manipulation code.
Camps.html This illustrates the use
of JavaScript to manipulate HTML "layers" (Netscape 4 only).
Here, the layers
appear/disappear and move around on the screen based on user actions.
Requires the following to images to be placed in a subdirectory called images:
peak4.gif and
Arrow-Right.gif.
Camps2.html A cross-browser
version of Camps.html that runs on both Internet Explorer and
Netscape.
Requires the following to images to be placed in a subdirectory called images:
peak4.gif and
Arrow-Right.gif.
CheckText.html
An example of using JavaScript to validate individual Form fields one at a time.
Note that there is not really a servlet at the other end that shows available
training courses; the field validation through JavaScript is the
point here.
Numbers.html
An illustration of how to validate the format of
numbers in different JavaScript versions.
CheckSeveral.html
An example of using JavaScript to validate
multiple Form fields in one fell swoop when the form is
submitted.
Widgets.html
This illustrates how JavaScript can manipulate
cookies: reading and parsing existing values, and asking you
to store them persistently.
ShowURL.html
Shows how JavaScript can manipulate frames. Here, a URL entered
in one cell is displayed in another. Uses the following files:
GetURL.html Contents for upper frame cell.
Contains actual JavaScript code.
CallJava.html Illustrates how JavaScript with
LiveConnect can call builtin Java methods directly.
Wonder-Widget.html
Illustrates how JavaScript with LiveConnect can call methods in
applets that are embedded in the current page. In this
particular case, the applet provides the client hostname
(something JavaScript can't check directly), and different resumes
are provided depending on whether the reader is inside the company or outside.
Uses the following files:
GetHost.java Applet used by
to determine domain of local computer.
ResumeLoyal.html.
Resume given to readers who are internal to widgets-r-us.com domain.
ResumeReal.html Resume given to
readers external to widgets-r-us.com domain.
MoldSimulation.html
Shows how JavaScript can control applets. Uses the following applet:
RandomCircles.java
Executes a background thread to draw random circles in the applet.
MatchColor.html
Shows how Java can call JavaScript to get information about the page the
applet is embedded in. Here, the applet looks up the color of the surrounding
page and matches it. Uses the following applet:
MatchColor.java
Applet that looks up the background color of the HTML document.
Everest.html
A Java applet that controls HTML form values.
Note that the form submission button is not really
attached to anything; the Java-JavaScript
interaction is the point here.
Uses the following files:
Everest.java
Applet that draws a mountain image and displays a slider.
LabeledCostSlider.java. A numeric slider class with attached
label. Used in the Everest class.
CostSlider.java. A slider class that lets you read numeric
values. Used in the LabeledCostSlider class.
Slider.java. A slider class: a combination of Scrollbar and
TextField. Used in the CostSlider class.
ScrollbarPanel.java
A Panel with adjustable top and bottom
insets, used by the Slider class to change the thickness of
the Slider.