Adding Interactivity to a Web Page
Objectives:

By the end of this lesson, you should be able to:

1. Explain different means for adding interactivity in a Web page.

Introduction

A Web page can be more engaging for the viewer if it is interactive. This could be as simple as providing text based feedback, or it can extend to multimedia and the use of complex scripting tools. In this lesson, just a few of the many examples of interactivity are provided.

Example 1. Text-Based Feedback

Providing feedback to students is a critical element of instruction, and with online Web pages, it is possible to take advantage of some special techniques to do this automatically, where automatic feedback to the user is appropriate. Here are three ways to provide text-based feedback.

Example 1A. Pop-up Answers

The following example uses pop-up windows to provide feedback to the page viewer.

Metal or Alloy?

Which of the following are metallic elements, and which are alloys? After you guess, position the cursor on the item for the answer to appear:

A. Aluminum

B. Brass

C. Bronze

D. Lead

E. Cast Iron

HTML Code

Here is the code for the first of these five words. It calls a separate Web page called riometallicsal.htm.

 <p><a href="javascript:" onMouseOver="win = window.open('riometallicsal.htm','','resizable=no, status=no, location=no, directories=no, menubar=no, copyhistory=no, toolbar=no, scrollbars=no, width=350,height=140');return true;" onMouseOut=" win.window.close(); return true;">
<font size="2">A. Aluminum</font></a>

Example 1B. Colored Text

In this example, students are asked to solve a geometry problem. The answer appears after the word: "Answer =>" but is of the same color as the background. To reveal the answer, the student clicks their mouse and drags it over the answer, highlighting it and thereby temporarily making it appear.

Geometry Problem

A typical picture frame has four 90o angles. Each piece of the frame is cut with a miter cut at a 45o angle to produce the typical picture frame corner. What angle would I use for the miter cut if I wanted to make a pentagonal frame with equal sides and angles?

To see the answer, click and drag over the area below.
Answer => 54o: The sum of the interior angles is (n - 2) * 180o or 540o, giving each internal angle a measurement of 108o.

Example 1C. An Interactive Form

It is possible to create your own forms in a Web page to supply feedback to users based on actions they take. The following form was developed using the instructions found at a tutorial from the University of Washington's TRIO training site.

Sample Question

True or False: Oak and pine are two different species of trees.
True
False

But text-based feedback is limited. Through the use of scripting languages, it is possible to create media-rich interactivity.

Example 2: Interactive Applets
Example 2A: An Interactive Applet on the Doppler Effect
The following applet and text can be found at the Davidson College Physlet Archive  and is enabled below:

Vary the velocity and notice the wavelength shift ahead of and behind the source. A shock wave, i.e., sonic boom, can be seen to form if the speed of the source is comparable to the phase velocity.

Example 2B: A Screenshot of an Interactive Applet Used to Teach about Reading Vernier Calipers.

This applet allows the user to slide the jaw to any location, type in the value, and receive input on their answer, or to automatically see the correct answer. The graphic below is just a screenshot, but you can see the applet in action here.

Vernier caliper applet

Summary

We have only seen here a few examples of how a Web page author might use interactivity, and many more exist. Interactivity can personalize a user's experience when they visit a Web page.

In addition, Web page authors can suggest outlets for interactivity that extend beyond their pages, such as asking the viewer to join a separate discussion forum, to contact an expert, or to engage in a face-to-face discussion with someone nearby.



All information is subject to change without notification.
© Jim Flowers
Industry & Technology, Ball State University

Hit Counter