UT Bullet Web-based Hypermedia Courseware Development

Chapter 4: Web-based Hypermedia Instruction
with HTML and JavaScript


Table of Contents


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Chapter 4: Web-based Hypermedia Instruction
with HTML and JavaScript

What You Will Learn To Do
    Red Bullet Web-based Hypermedia Instructional Systems:
      Cyan Bullet Design
      Cyan Bullet Development
      Cyan Bullet Implementation
        Blue Bullet Web-based Screen Displays Using HTML 3
          Blue Bullet Absolute Tables
          Blue Bullet Relative Tables
        Blue Bullet Expanded Web-based Immediate Feedback, Scoring and Email
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 1 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Web-based Hypermedia Instructional Systems Design:
Beyond Information, Quiz and Practice Exercise

You now have introductory level skills with a broad range of Web-based hypermedia applications (e.g., course Web-pages, syllabi, instructor bios, course notes, course news groups, instructor email links, Web-based quizzes, Web-based practice exercises). You can provide information, display text, graphics, and sound. Given browser navigation features and HTML hyperlink capabilities, your Web documents have a fairly high degree of student-centered interactivity and learner control. That interactivity is no longer limited to presentation, to navigation or positioning -- the "where" of instruction, but extends now to a higher level including practice, feedback for radio button presses, scoring, and performance summary information.

You now can ask questions, prompt comments and evaluate responses. You can provide immediate feedback. You can ask questions in a variety of commonly used formats, like fill-in-the blank, multiple-choice, short answer, true-false, and completion items. And, for radio button choices, you can check, and provide immediate correction and feedback or hints for each different choice. You can have quiz or practice exercise assignments submitted, already scored, in a convenient format via email. Your HTML skills already exceed what many of the HTML editors on the market at the end of 1996 could implement.

Now you are going to integrate those skills into a more comprehensive theoretical and empirical framework for the design, development and implementation of effective hypermedia instructional systems. The present hypermedia tutorial (hypertutorial) implements many features of that framework.

The Hypertutor Model Implemented

The Hypertutor Model is a message design framework for interactive instructional systems that facilitates development of student-centered, rather than machine-centered, instruction. The Hypertutor Model, coupled with today's improved hardware and software technologies, can help the instructional designer/developer create improved instructional environments with extensive learner control, effective content presentation, extended opportunities for practice and feedback, and elaborative learning resources. The Hypertutor Model ties together multiple threads of instructional design concepts, principles, and empirical findings within a meaningful, organized, systematic framework emphasizing the active learner. Systems appropriately operationalizing the Hypertutor Model are referred to as Hypertutor systems. See Johnson and Grover (1993) for a complete discussion.

Hypertutor Model
Practice
Exercise:
Practice Exercise 4.1:
The Hypertutor model can help instructional developers create improved instructional environments by helping the developer to conceptualize and optimally execute instruction within a systematic framework emphasizing the active learner. The Hypertutor Model includes which of the following features?

No response
Learner Control
Presentation
Practice
Feedback
Learning Resources

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 2 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Hypertutor Systems

Hypertutor systems are instructional systems that offer full and complete exploitation of instructional message design principles as they implement the five features of the Hypertutor Model. Following paragraphs describe the features of hypertutor systems as presented in Figure 2.

Figure 2: Hypertutor Systems
Feature Example Implementation
Learner Control Red Bullet Sophisticated Branching
Red Bullet Learner Directed
Red Bullet Intuitive Consistent Interface
Red Bullet Intuitive Default Structure
Red Bullet Multi-Purpose
Presentation Red Bullet Instructional Message Design
Red Bullet Visual Orientation
Red Bullet Multiple Examples
Red Bullet Consistent Formats
Practice Red Bullet Multiple Questions
Red Bullet Realistic Formats
Red Bullet Random Data
Feedback Red Bullet Immediate
Red Bullet Graded
Red Bullet Appropriate and Varied
Red Bullet Tolerate Trivial Errors
Red Bullet Performance Evaluation
Learning Resources Red Bullet Context-Sensitive
Red Bullet Cross-Referenced
Red Bullet Self-Contained
Red Bullet Easily Accessible
Red Bullet Standard Formats
Red Bullet Hypertext Help/Glossary
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 3 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Learner Control
Hypertutor systems embed a strongly prompted, highly intuitive default structure within an instructional environment having a high degree of learner control. The default structure follows a familiar format (e.g., an interactive textbook). Learners who seek more structure may follow the default path. Active learners may choose their own instructional paths using a consistent, intuitive interface incorporating sophisticated, learner directed, branching. Hypertutor systems invite the active learner to move forward or backward, to omit sections, to branch to any section, to focus on weaknesses through repeated practice and feedback, or to shift to elaborative learning resources. Learner control encourages self-regulated learning, stimulates the active learner to manage the sequence of instructional events, can accomodate individual differences, and enhances continuing motivation while allowing multiple purposes or uses (Jelden and Brown, 1982-83; Kinzie, 1990; Kinzie and Birdel, 1990; Zimmerman, 1990). Learner control features make the same courseware package useful for initial learning, review, additional practice, or as an instructional presentation aid.

Learner Control Review Question
Question: An instructional environment with high levels of learner control has which of the following attributes?

No response
Encourages self-regulated learning
Stimulates active learner to manage instruction
Accomodates individual differences
Enhances continuing motivation
Allows multiple uses



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 4 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Presentation

Presentation refers to the substance and format of instruction. Presentations that exploit instructional message design principles communicate content more effectively (Fleming and Levie, 1978, 1993). Hypertutor systems deliver, at the learner's request, an abundance of fresh examples embedded within consistent, visually oriented presentations exploiting instructional message design principles. The following summarize some of the guidelines.

Presentation Review Question
Question: Guidelines for effective instructional message design include which of the following principles?

No response
Supply many examples
Use consistent formats
Keep it simple
Use visual organization for emphasis
Use signposts



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 5 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Practice

Practice refers to covert or overt repetition of behaviors to be learned. Practice is essential to learning as is unequivocally documented in the literature. Providing insufficient practice is a common courseware deficiency. Hypertutor systems deliver at the learner's request an abundance of fresh, embedded practice exercises, problems, questions, or scrolling worksheets, that possess structures simulating those in the real world.

Practice Review Question
Question: Practice does not include which of the following?

No Response
Questions
Examples
Exercises
Problems



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 6 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Feedback
Feedback refers to the consequences of behavior. Some instructional message design issues relevant to feedback include: (a) immediacy, (b) frequency, (c) variability, and (d) cueing. The role of feedback in learning has been acknowledged since antiquity. While more recently the functionalists and operant behaviorists have particularly emphasized the consequences of behavior. Hypertutor systems include immediate, frequent, appropriate and varied feedback. Hypertutor systems deliver feedback (perhaps randomly chosen) selected from sizeable pools of appropriate responses, tolerate spelling and rounding errors, and display comprehensive graphic performance evaluations.

Feedback Review Question
Question: Hypertutor systems deliver feedback that is:

No Response
Delayed
Transient
Immediate
None of the above



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 7 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Learning Resources

Learning resources have traditionally not been assigned a high priority when designing interactive instruction. But, with the increasing recognition of the value of learner control, self-regulation, and continuing motivation, there is a new awareness of the positive role learning resources can play (Kinzie and Birdel, 1990). Learning resources provide for elaboration and enrichment activities and facilitate deeper, more elaborative, cognitive processing whose mnemonic value is well documented (e.g., Anderson and Pichert, 1987; Craik and Lockhart, 1972; Pressley, McDaniel, Turnure, Wood and Ahmad, 1987). Hypertutor systems deliver instant access to elaborative learning resources, including meanings of substantive vocabulary and related concepts, cross-referenced indexes, context-sensitive hypertext help, tables of contents, calculators, graphs, and so on.

Learning Resources Review Question
Question: Hypertutor Learning Resources include things like:

No Response
Hypertext Table of Contents
Hypertext Glossary
Tables
All except "No Response"



You've now got a pretty good idea of the kinds of qualities that make Web-based hypermedia instruction effective. Before you move into the more challenging arena of implementing Web-based instructional hypertutor systems, however, you need to know the process used for instructional systems development as it is applied to instructional hypermedia.

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 8 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Web-based Hypermedia Instructional Systems Development

There are a number of different representations of important steps in the development of hypermedia instructional systems, but in general they can be summarized in the five steps outlined in Figure 3 below and referred to as the Hypermedia Instructional Systems Development Model. Study Figure 3. Then respond to the review questions which follow.

Figure 3: Hypermedia Instructional Systems Development

Front-End
Analysis

Define Title.
Red Bullet Define Topic.
Red Bullet Define the Need.
Red Bullet Define the Target Audience.
Red Bullet Define how Instruction will be Used.
Red Bullet Define the Goal(s) of the Instruction.
Red Bullet Identify the Approach to be used.
Red Bullet Identify Relationship between the Instruction and Other Instructional Materials.

Outcome
Representation

Red Bullet Clarify Goal(s).
Red Bullet Specify Instructional/Behavioral Objectives.
    Cyan Bullet Terminal Objectives
      Blue Bullet Specify Observable Student Behavior.
      Blue Bullet Specify Conditions Under Which Behavior will be Performed.
      Blue Bullet Specify Criterion Level of Acceptable Performance.
    Cyan Bullet Enabling Objectives
      Blue Bullet Specify Observable Student Behavior.
      Blue Bullet Specify Conditions Under Which Behavior will be Performed.
      Blue Bullet Specify Criterion Level of Acceptable Performance.

Lesson
Design

Red Bullet Gather Verbal and Visual Content Ideas.
Red Bullet Diagram Top Level Flowchart.
Red Bullet Produce Detailed Planning Document (Screen Maps or Layouts) specifying content and format of instruction.

Lesson
Creation

Red Bullet Write/Draw/Paint, etc.
Red Bullet Pseudocode/Code/Debug.
Red Bullet Edit.

Lesson
Validation

Red Bullet Review.
Red Bullet Field Test.
Red Bullet Evaluate.

Planning Document Screen Maps: Working Drafts

The planning document consists primarily of screen maps or screen display layouts which are similar to a storyboard. The screen maps are not a product, but a working draft document, quickly constructed, easily revised. They are like preliminary sketches, blueprints, or "thumbnails". The screen maps present an outcome oriented plan representing the look and feel, the content, the format, the sequencing and the logic (branching) of the finished document, display by display, screen by screen, page by page. When working as part of a development team, the screen maps play the role of blueprints in a construction project. They communicate clearly to each member of the team the content, format, text, graphics, logic, and sequencing to be achieved.

Steps as Guidelines

It is important to observe the steps for hypermedia instructional systems development above as general guidelines. They are not to be viewed as a lockstep, regimented process, but should be adapted to the situation and managed with flexibility. Also, use spiral development. Return to earlier steps, evaluate, revise and build upon earlier iterations, making repeated passes through the steps. The highly experienced author of Web-based Hypermedia instructional systems may be able to effectively prototype questionable components, outline the content and visualize the form of the entire completed project in advance, and adapt and revise to criterion on an ongoing basis.

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 9 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Hypermedia Instructional Systems Development Question Review
Question 1: Following the steps in the hypermedia instructional systems development process, the first step is to do:

No Response
Front-end analysis
Objectives
Flowchart diagram(s)
Field tests



Hypermedia Instructional Systems Development Question Review
Question 2: A major part of the second step in the hypermedia instructional systems development process is to:

No Response
Define goals
Define objectives
Diagram flowchart(s)
Field test



Hypermedia Instructional Systems Development Question Review
Question 3: A primary component of the third step in the hypermedia instructional systems development process is to develop:

No Response
Goals
Prerequisites
Objectives
Screen maps



Hypermedia Instructional Systems Development Question Review
Question 4: The last step in the hypermedia instructional systems development process is:

No Response
Lesson Evaluation
Lesson Creation
Lesson Design
Outcome Representation



Hypermedia Instructional Systems Development Question Review
Question 5: The steps in the hypermedia instructional systems development process are to be rigorously implemented:

No Response
True
False



Hypermedia Instructional Systems Development Question Review
Question 6: Screen maps are like:

No Response
Storyboards
Working drafts
Sketches
Blueprints
All except "1" above



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 10 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Web-based Hypermedia Instructional Systems Implementation

You now know what it takes to design and to develop effective Web-based hypermedia instruction. Before you apply this knowledge, however, with a move into the more challenging arena of actually implementing fullblown Hypertutor systems, it is helpful to have some additional HTML and JavaScript skills in the following areas:

Superior Displays Using HTML 3 Tables

HTML 3 specifications include the TABLE element. HTML tables are a powerful tool not only for the display of tables, but for much more general screen formatting purposes. Tables may be set up to have either absolute or relative (percent) dimensions and you have the option to display or not to display borders. The combination of available table attributes makes the HTML table a frequently used feature in Web-based instructional hypermedia systems. In this hypertutorial alone, tables have been used to display the Element Study Tables, to frame and caption graphics displays, to manage margin widths, to display practice exercises and review questions, and to generally maintain relative positioning of instructional display components. Tables may be used to help wrap text around inline images and to manage to some degree the contents of a screen or page by specifying the height and width of a table as a percent of the height and width of the display, whether it be a hardcopy page, or a display having 1028 by 764, 800 by 600, 640 by 480 or some other dimensions.

Before you can begin to use HTML tables, you need to study the Element Study Table for the HTML TABLE element, some simple examples of TABLE element usage, the review questions which follow and then, finally, some complete HTML document examples of TABLE element usage. You can then try your hand at integrating TABLE elements into your own Web-based hypermedia courseware.

The Table Element

A table consists of whatever elements are included between the TABLE start and end tags within a document. Table TR, TH, TD, and CAPTION elements must be contained in the TABLE element. The TABLE element itself must be contained in the BODY element. The TABLE element has a number of attributes which are described below. These attributes are implemented to varying degrees in different browsers. Only those used most commonly are addressed in the following discussion. See Graham (1995) and Stout (1996) for more complete discussions. As with previous HTML elements, attribute names immediately follow the HTML element name in the "Usage" cell of the Table Element Study Table.

The HTML 3 TABLE Element Study Table is similar to those used to introduce the HTML elements in previous chapters. As in previous chapters, the Element Study Table includes description, usage syntax, and HTML version information. But unlike previous chapters, examples will not be included in the table, but will follow it, because placing a table within a table is beyond most current browser capabilities. Consequently, in the present chapter, there is one Table Element Study Table.
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 11 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
The TABLE Element Study Table
Element: TABLE
Description: Contains all elements of a table.

The TABLE element specifies and contains any number of rows and columns. Columns may span more than one row. Rows may span more than one column. A table may have a displayed border. Tables may contain row or column headings. A table may have a caption. Table rows and columns may have specified widths. The height and width of the whole table may be specified.

The TABLE element can contain CAPTION, TR, TH, TD table elements in addition to most other HTML elements. HEIGHT and WIDTH may be expressed as a percentage (e.g., HEIGHT=90% WIDTH=80%) creating the powerful capability referred to in this hypertutorial as relative tables.

CAPTION:
Places a caption above the table.
TR:
Starts a table row.
TH:
Starts a table heading.
TD:
Starts the definition of a table cell.
The TR, TH, and TD elements may have ALIGN=LEFT, CENTER or RIGHT attributes. With HTML 3.0 and above, none require end tags.
Usage: <TABLE [BORDER="border"]
[HEIGHT="height"]
[WIDTH="width"]
[ALIGN= LEFT | CENTER | RIGHT]
[BGCOLOR="RGB color number"]>
[elements]
</TABLE>
L: 3
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 12 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Table Examples: Simple Tables

The plan is to start with the simplest absolute tables with few defined attributes and build up to powerful relative tables with multiple attributes. For each example, study the HTML to see how it produces the display which immediately follows it. Remember, of course, that it is assumed in examples which follow, that all the HTML is contained within the BODY element of an HTML document.

Tables are fairly simple if you keep one thing in mind. When defining the elements of a table you define one row at a time starting with the top row. Each row starts with a TR start tag. You define the elements of that row one cell at a time starting from the left and moving to the right. Study the following HTML examples, or enter them yourself using the edit, save, reload and test cycle, for many illustrations of the use of the most common table elements and attributes.

A Simple Absolute Table
Example 4.1
HTML Text:
<TABLE>
  <CAPTION>
    Your First Table
  </CAPTION>
  <TR>
    <TD>Upper Left Cell <TD>Upper Right Cell
  <TR>
    <TD>Lower Left Cell <TD>Lower Right Cell
</TABLE>

____________ Displays as Follows: ____________


Your First Table
Upper Left Cell Upper Right Cell
Lower Left Cell Lower Right Cell


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 13 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Your first table demonstrated the use of the CAPTION, TR and TD elements. There were two rows, each starting with TR and two cells within each row, each starting with TD. Your second table is different in only one detail. A row has been added at the top of the table for column headings. So now there are three TR elements and the first TR is followed by two TH elements, one for each column heading.

An Absolute Table With Column Headings
Example 4.2
HTML Text:
<TABLE>
  <CAPTION>
    Your Second Table
  </CAPTION>
  <TR>
    <TH>Left Heading    <TH>Right Heading
  <TR>
    <TD>Upper Left Cell <TD>Upper Right Cell
  <TR>
    <TD>Lower Left Cell <TD>Lower Right Cell
</TABLE>

____________ Displays as Follows: ____________


Your Second Table
Left Heading Right Heading
Upper Left Cell Upper Right Cell
Lower Left Cell Lower Right Cell


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 14 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Your second table demonstrated the use of the TH element to produce column headings. It may also be used for row headings as you will see shortly. Now, lets add the table border. Easy to do. Just add the BORDER attribute to the previous table.

An Absolute Table with Column Headings and a Border
Example 4.3
HTML Text:
<TABLE BORDER>
  <CAPTION>
    Your Third Table
  </CAPTION>
  <TR>
    <TH>Left Heading    <TH>Right Heading
  <TR>
    <TD>Upper Left Cell <TD>Upper Right Cell
  <TR>
    <TD>Lower Left Cell <TD>Lower Right Cell
</TABLE>

____________ Displays as Follows: ____________


Your Third Table
Left Heading Right Heading
Upper Left Cell Upper Right Cell
Lower Left Cell Lower Right Cell


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 15 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Now let's expand the table to have two rows and three columns. Just add one more TD element after each TR element as shown below.

An Absolute Table with Two Rows and Three Columns
Example 4.4
HTML Text:
<TABLE BORDER>
  <CAPTION>
    Your Fourth Table
  </CAPTION>
  <TR>
    <TD>Upper Left Cell
    <TD>Upper Middle Cell
    <TD>Upper Right Cell
  <TR>
    <TD>Lower Left Cell
    <TD>Lower Middle Cell
    <TD>Lower Right Cell
</TABLE>

____________ Displays as Follows: ____________


Your Fourth Table
Upper Left Cell Upper Middle Cell Upper Right Cell
Lower Left Cell Lower Middle Cell Lower Right Cell


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 16 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Now let's add another row of three cells to the table and add a background color of cyan (#00F0F0) to the table. Note the use of the BGCOLOR attribute for the table. Just add one more TR element with three TD elements for the additional row as shown below. Notice how the browser automatically makes the cells just big enough to accomodate the contents of the largest cell.

An Absolute Table with Three Rows, Two Columns and Color
Example 4.5
HTML Text:
<TABLE BORDER BGCOLOR="#00F0F0">
  <CAPTION>
  Your Fifth Table
  </CAPTION>
  <TR>
    <TD>Upper Left Cell
    <TD>Upper Middle Cell
    <TD>Upper Right Cell
  <TR>
    <TD>Middle Left Cell
    <TD>Middle Middle Cell
    <TD>Middle Right Cell
  <TR>
    <TD>Lower Left Cell
    <TD>Lower Middle Cell
    <TD>Lower Right Cell
</TABLE>

____________ Displays as Follows: ____________


Your Fifth Table
Upper Left Cell Upper Middle Cell Upper Right Cell
Middle Left Cell Middle Middle Cell Middle Right Cell
Lower Left Cell Lower Middle Cell Lower Right Cell


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 17 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Table Examples: Relative Tables

Starting to get a bit more interesting now, isn't it? Now let's make the table a relative table having width equal to 70% of the screen window's width and height equal to 70% of the screen window's height (no matter what the size of the window, as long as everything in the table will still fit in the 70% region). Such tables are referred to in this hypertutorial as relative tables, because the size of the table adjusts, if it can, or is relative to the size of the display window. Relative table sizes also adjust, if possible, to the size of hardcopy pages when printed.

Also, let's color some of the cells in the table independently of the overall background color of the table. This can be done by applying the BGCOLOR attribute independently to the TR, TH or TD elements of the table as illustrated in the following example. Finally, let's center the whole table for better symmetry in the screen display. You'll generally want to center relative tables. After first viewing the table display below, resize your screen a number of times. Notice how the size of the table adapts, if possible, to occupy 70% of the window width and height. This use of relative tables is part of what is meant by using relative rather than absolute positioning of screen elements.

A Centered Relative 3 by 3 Table with Independent Row and Cell Colors
Example 4.6
HTML Text:
<CENTER>
<TABLE BORDER BGCOLOR=#00F0F0 WIDTH=70% HEIGHT=70%>
  <CAPTION>
  Your Sixth Table
  </CAPTION>
  <TR BGCOLOR=#F0F000>
    <TD>Upper Left Cell
    <TD>Upper Middle Cell
    <TD>Upper Right Cell
  <TR>
    <TD>Middle Left Cell
    <TD BGCOLOR=#00F000>Middle Middle Cell
    <TD>Middle Right Cell
  <TR BGCOLOR=#F000F0>
    <TD>Lower Left Cell
    <TD>Lower Middle Cell
    <TD>Lower Right Cell
</TABLE>
</CENTER>

____________ Displays as Follows: ____________


Your Sixth Table
Upper Left Cell Upper Middle Cell Upper Right Cell
Middle Left Cell Middle Middle Cell Middle Right Cell
Lower Left Cell Lower Middle Cell Lower Right Cell



Table Element Review Question
Question 1: Relative tables are different from absolute tables in that height and/or width of the tables are defined using:

No Response
integers
fractions
percentages
names





Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 18 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Now, lets expand the table to 90% of the window width and height. Also, let's give the columns a caption that spans all three columns. This is easy to do by setting a TH element to a COLSPAN=3 attribute for the first row in the table. Finally, let's center some of the rows and cells independently by applying the ALIGN=CENTER attribute to chosen rows and columns. Let's put much more text in the lower right cell to see what happens to the table. Again, notice how the size of the table adapts to occupy 90% of the window width and height if it can. What this means is that you can generally make your tables occupy whatever portion of the screen you choose, so that they will look right no matter what the window dimensions (within limits of course).

A More Elaborate Centered Relative Table with a Column Spanning Heading
Example 4.7
HTML Text:
<CENTER>
<TABLE BORDER BGCOLOR=#00F0F0 WIDTH=90% HEIGHT=90%>
  <CAPTION>
    Your Seventh Table
  </CAPTION>
  <TR>
    <TH COLSPAN=3>Note: Resize the Window.<BR>
    Relative Dimensions Mean Table Resizes With Window
  <TR BGCOLOR=#F0F000>
    <TD>Upper Left Cell
    <TD>Upper Middle Cell
    <TD ALIGN=CENTER>Note this text is centered.
  <TR ALIGN=CENTER>
    <TD>Middle Left Cell
    <TD BGCOLOR=#00F000>Middle Middle Cell
    <TD>Note text in this row is centered.
  <TR BGCOLOR=#F000F0>
    <TD>Lower Left Cell
    <TD>Lower Middle Cell
    <TD>Table cell sizes automatically adjust to
          contain their contents.  If contents are
          too large to fit within relative dimensions
          specified, those dimensions will be overridden
          to accomodate the table information.
</TABLE>
</CENTER>

____________ Displays as Follows: ____________


Your Seventh Table
Note: Resize the Window.
Relative Dimensions Mean Table Resizes With Window
Upper Left Cell Upper Middle Cell Note this text is centered.
Middle Left Cell Middle Middle Cell Note text in this row is centered.
Lower Left Cell Lower Middle Cell Table cell sizes automatically adjust to contain their contents. If contents are too large to fit within relative dimensions specified, those dimensions will be overridden to accomodate the table information.



Table Element Review Question
Question 2: Relative tables are usually:

No Response
left justified
right justified
centered
none of the above





Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 19 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Now, lets add some graphics. The example below reads in the same graphics file you've seen previously, but shrinks the image to make it more amenable to the size of a table cell. The image can be centered within any cell by placing it within the CENTER element. You can see that it is is easy to take the same graphic image and display it in any number of sizes, centered within any region of the screen by positioning it within a cell of a table. This can be valuable when you want to wrap text around graphic displays, or position text relative to graphics more generally.

A Relative Table with Graphics
Example 4.8
HTML Text:
<CENTER>
<TABLE BORDER BGCOLOR=#00F0F0 WIDTH=90% HEIGHT=90%>
  <CAPTION>
   Your Eighth Table
  </CAPTION>
  <TR>
    <TH COLSPAN=3>Note: Resize the Window.<BR>
    Relative Dimensions Mean Table Resizes With Window
  <TR BGCOLOR=#F0F000>
    <TD>Upper Left Cell
    <TD>Upper Middle Cell
    <TD ALIGN=CENTER><IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/LEARNCON.GIF" HEIGHT=150 WIDTH=180>
  <TR ALIGN=CENTER>
    <TD>Middle Left Cell
    <TD BGCOLOR=#00F000>Middle Middle Cell
    <TD>Note text in this row is centered.
  <TR BGCOLOR=#F000F0>
    <TD>Lower Left Cell
    <TD>Lower Middle Cell
    <TD ALIGN=CENTER><IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/LEARNCON.GIF" HEIGHT=50 WIDTH=60>
</TABLE>
</CENTER>

____________ Displays as Follows: ____________


Your Eighth Table
Note: Resize the Window.
Relative Dimensions Mean Table Resizes With Window
Upper Left Cell Upper Middle Cell
Middle Left Cell Middle Middle Cell Note text in this row is centered.
Lower Left Cell Lower Middle Cell



Table Element Review Question
Question 3: Graphics or text may be colored, centered, left-justified, or right-justified independently in any table row, cell, or column.

No Response
True
False




Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 20 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Now, lets add a row heading spanning several rows. The example simply adds the "<TH ROWSPAN=3>Note Heading for Rows" after the the 2nd TR element. This insertion adds a heading for the three rows following the column heading.

A Relative Table with Graphics, Column and Row Headings
Example 4.9
HTML Text:
<CENTER>
<TABLE BORDER BGCOLOR=#00F0F0 WIDTH=90% HEIGHT=90%>
  <CAPTION>
  Your Ninth Table
  </CAPTION>
  <TR>
    <TH COLSPAN=4>Note: Relative Dimensions (%) Mean Table<BR>
    Proportions Preserved if Possible
  <TR BGCOLOR=#F0F000>
    <TH ROWSPAN=3>Note Heading For Rows
    <TD>Upper Left Cell
    <TD>Upper Middle Cell
    <TD ALIGN=CENTER><IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/LEARNCON.GIF" HEIGHT=150 WIDTH=180>
  <TR ALIGN=CENTER>
    <TD>Middle Left Cell
    <TD BGCOLOR=#00F000>Middle Middle Cell
    <TD>Note text in this row is centered.
  <TR BGCOLOR=#F000F0>
    <TD>Lower Left Cell
    <TD>Lower Middle Cell
    <TD ALIGN=CENTER><IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/LEARNCON.GIF" HEIGHT=50 WIDTH=60>
</TABLE>
</CENTER>

____________ Displays as Follows: ____________


Your Ninth Table
Note: Relative Dimensions (%) Mean Table Proportions Preserved if Possible
Note Heading For Rows Upper Left Cell Upper Middle Cell
Middle Left Cell Middle Middle Cell Note text in this row is centered.
Lower Left Cell Lower Middle Cell



Table Element Review Question
Question 4: Table row headings (rows are horizontal) may span multiple rows by making use of which TABLE attribute?

No Response
COLSPEC
ROWSPEC
COLSPAN
ROWSPAN




Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 21 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Now, lets put it all together to create a title screen. Inline graphics, in a relative table, with multiple fonts and colors. About all that is new in the next example is its use of a custom image file for the horizontal rule and its use of the FONT element to specify the text colors of fonts. Notice when you resize the window, that within limits, the positioning of the table elements adjusts so that the display continues to appear centered occupying approximately 90% of the screen width and height.

A Title Screen HTML Example Using a Relative Table
Example 4.10
HTML Text:
<A NAME="P1">
<IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/RULE01.GIF" HEIGHT=22 WIDTH=100%>
</A>
<CENTER>
<TABLE BORDER UNITS=EN CELLPADDING=5 WIDTH=100% HEIGHT=90%>
  <TR><TD>
  <CENTER><IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/THEART.GIF" ALT="Picture of Heart"
   WIDTH=210 HEIGHT=280></CENTER>

      <TD>
      <CENTER>
        <FONT COLOR="#FF0000" SIZE=7>
        <I>Heart Attack:</I><BR>
        </FONT>
      <H1>
        <FONT COLOR="#00FF00">
        Reducing the Risk!
        </FONT>
      </H1>
      <P><IMG SRC="HTTP://www.uth.tmc.edu/uth_orgs/educ_dev/whcd/RULE01.GIF" HEIGHT=22 WIDTH=200></P>
      Copyright © 1996<BR>
      Craig W. Johnson, Ph.D.
     </CENTER>
</TABLE>
</CENTER>

____________ Displays as Follows: ____________


Picture of Heart
Heart Attack:

Reducing the Risk!

Copyright © 1996
Craig W. Johnson, Ph.D.


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 22 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Expanded JavaScript Form Feedback, Scoring, Email Skills

The purpose of the following sections is to enable you to extend your JavaScript immediate feedback, scoring, and email skills. As of now, you know how to handle radio buttons. You are going to quickly extend those skills to cover the forms elements used most frequently in hypermedia instructional systems:

You will do this, again by focusing only on what you need to know to achieve the immediate goal. See Flanagan (1996), Goodman (1996), Ritchey (1996), or Shafer (1996), for more elaborate and complete presentations of JavaScript.

JavaScript: Reading Values of Form Elements

You can use JavaScript to refer to and access the state or value of any entry contained in any form element. Chapter 3 demonstrated that document form element names may be strung together separated by periods to refer to a particular button's state. So, in particular, the state of the 4th button in the 3rd question of the PE form used in Chapter 3 may be referred to from within that document by the following expression (note [3] designates the 4th array element because the first element in the array has index [0]):

document.PE.Q3[3].checked.

More importantly, there is an underlying pattern in that expression that generalizes to other form elements. Much form element data may be identified from within the document using an expression having the following general format:

document.formname.elementname[arrayindex].attribute.

Apply this template and the examples below to the different types of form elements in approaching the review questions which follow.

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 23 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Radio Buttons.

Applying the document.formname.elementname[arrayindex].attribute template to reading radio button entries using JavaScript expressions:
Radio Element Value Question Review
Question 1: In the form named QUIZ the JavaScript statement that correctly assigns to a variable named response the checked status of the 4th radio element in the group of radio buttons named QUESTION6 is:

No Response
response=document.QUIZ.QUESTION6[3].checked;
response=document.QUIZ.QUESTION6[3].value;
response=document.QUIZ.QUESTION6[4].checked;
response=document.QUIZ.QUESTION6[4].value;



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 24 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Checkboxes

Applying the document.formname.elementname[arrayindex].attribute template to reading checkbox elements using JavaScript expressions:
Checkbox Element Value Question Review
Question 2: In the form named QUIZ the JavaScript statement that correctly assigns to a variable named response the checked status of the 4th checkbox element in the group of checkboxes named QUESTION6 is:

No Response
response=document.QUIZ.QUESTION6[3].checked;
response=document.QUIZ.QUESTION6[3].value;
response=document.QUIZ.QUESTION6[4].checked;
response=document.QUIZ.QUESTION6[4].value;



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 25 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Text Elements

Applying the document.formname.elementname[arrayindex].attribute template to reading text element entries using JavaScript expressions:
Text Element Value Question Review
Question 3: In the form named EXAM1 the JavaScript statement that correctly assigns to a variable named response the text typed into the text element named ADDRESS is:

No Response
response=document.EXAM1.ADDRESS.checked;
response=document.EXAM1.ADDRESS.value;
response=document.EXAM1.ADDRESS[2].value;
response=document.EXAM1.ADDRESS.text;



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 26 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Textarea Elements

Applying the document.formname.elementname[arrayindex].attribute template to reading textarea element entries using JavaScript expressions:
Textarea Element Value Question Review
Question 4: In the form named EVALUATION the JavaScript statement that correctly assigns to a variable named response the text typed into the NOTES textarea element is:

No Response
response=document.NOTES.EVALUATION.value;
response=document.EVALUATION.NOTES.value;
response=document.NOTES.EVALUATION.text;
response=document.EVALUATION.NOTES.text;



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 27 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Select/Option Elements

The SELECT element is more problematical. It takes two steps to read the selected option from a SELECT element. First, you need to find out the element array index value of the selected option (index in the examples below). Then, you need to determine the text associated with that element array index. Typically, you assign the values determined to variables so you may use them later. Once you know the two steps, you've got the template for reading the information from any SELECT item. Here, in template format, is the form of the two statements used to read the value of the selected option entries using JavaScript expressions:

  1. index=document.form.elementname.selectedIndex;
  2. value=document.form.elementname.options[index].text;
So, applying the above templates to reading select element entries using JavaScript expressions:
Select Element Value Question Review
Question 5: In the form named EVALUATION the JavaScript expression that correctly assigns to a variable named index the selected option array index of the SELECT element named ITEM2 is:

No Response
index=document.ITEM2.EVALUATION.value;
index=document.EVALUATION.ITEM2.value;
index=document.ITEM2.EVALUATION.selectedIndex;
index=document.EVALUATION.ITEM2.selectedIndex;



Select Element Value Question Review
Question 6: In the form named EVALUATION, given that the index variable has been assigned the array index of the selected option, the JavaScript expression that correctly assigns to a variable named value the text of the selected option from the SELECT element named ITEM2 is:

No Response
value=document.ITEM2.options[index].EVALUATION.text;
value=document.EVALUATION.options[index].ITEM2.value;
value=document.ITEM2.options[index].EVALUATION.value;
value=document.EVALUATION.options[index].ITEM2.text;
value=document.ITEM2.EVALUATION.options[index].text;
value=document.EVALUATION.ITEM2.options[index].value;
value=document.ITEM2.EVALUATION.options[index].value;
value=document.EVALUATION.ITEM2.options[index].text;



Select Element Value Question Review
Question 7: In the form named QUIZ the JavaScript expression that correctly assigns to a variable named index the selected option array index of the SELECT element named QUIZ1 is:

No Response
index=document.QUIZ1.QUIZ.selectedIndex;
index=document.QUIZ.QUIZ1.selectedIndex;
index=document.QUIZ1.QUIZ.value;
index=document.QUIZ.QUIZ1.value;



Select Element Value Question Review
Question 8: In the form named QUIZ, given that the index variable has been assigned the array index of the selected option, the JavaScript expression that correctly assigns to a variable named value the text of the selected option from the SELECT element named QUIZ1 is:

No Response
value=document.QUIZ1.QUIZ.options[index].text;
value=document.QUIZ.QUIZ1.options[index].value;
value=document.QUIZ1.QUIZ.options[index].value;
value=document.QUIZ.QUIZ1.options[index].text;
value=document.QUIZ1.options[index].QUIZ.text;
value=document.QUIZ.options[index].QUIZ1.value;
value=document.QUIZ1.options[index].QUIZ.value;
value=document.QUIZ.options[index].QUIZ1.text;



Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 28 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
JavaScript: Using Form Element Values in Scoring, Email and Feedback

Given the previous examples you should soon be able to apply the above templates to read entered or chosen values, compare them to correct answers, provide immediate feedback, and include their values in emailed summaries for checkbox, radio button, select element, text element and textarea element entries. Other kinds of entries occur infrequently but would be handled in a manner similar to text element entries by accessing the appropriate attribute of the element.

The Logical Element Practice Exercises of Example 3.4 in Chapter 3 demonstrated how to score, provide immediate feedback and email responses for a set of 5 multiple-choice items consisting of radio buttons. How would you handle a set of seven JavaScript exercises with a broader range of response formats, including even an open-ended, "Comments:" item?

Suppose the set, first, includes three radio button items each having five buttons plus a special "Evaluate" button for each item to be pressed for feedback. Suppose also that the set then includes, two select element items and associated "Evaluate" buttons. Suppose, finally, that it also includes two text element items and associated "Evaluate" buttons, and one textarea element for the comments. These types of form elements comprise those most typically needed to handle learner's responses to questions. How would you handle scoring, emailing and item feedback?

A general problem solving heuristic is -- if you are confronted with a problem you don't know how to solve, liken it to a problem you do know how to solve and adapt and modify as needed. This heuristic provides the essence of the strategy for handling scoring, feedback and emailing more generally. Start with the same general plan as in the Logical Element Practice Exercises. Simply, adapt the functions for scoring and emailing, and also add a function for handling feedback to the various types of form elements. You adapt the functions making use of the guidelines and examples just illustrated in the JavaScript: Reading Values of Form Elements section.

More specifically, the plan is to use the same steps as in the Logical Element Practice Exercises, but to carry out the steps separately for each different type of item, because of the differing ways of reading item responses. This sounds somewhat cumbersome. And, it is. But, in practice, once you have done it a few times, it's not that bad. Especially, because you can adapt working functions like those in this hypertutorial to your tasks. You can use cut and paste to copy whole sections of JavaScript and then make the frequently relatively minor adaptations to achieve your goals.

That is the overall plan. It forms the essense of the logic for your handling of scoring, emailing and immediate feedback for JavaScript, radio button, select element, text element, and textarea elements. Putting the plan more formally, it could be expressed as follows:

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 29 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
JavaScript: Plan for Script.
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 30 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

JavaScript Script: Translated Scoring, Email and Feedback Plan. Now, keeping the above points in mind, let's translate the plan into JavaScript. The JavaScript translation follows below (remember the i++ tells the computer to increment i by 1 each time the cycle (loop) is repeated). You may, again, use the JavaScript below as a model for your own form element scoring, email and feedback. Remember, the double slashes, "//", below in JavaScript mean explanatory comments for the script reader that are ignored by JavaScript.

<SCRIPT LANGUAGE="JavaScript">
<!-- Hide script from older browsers

// Below defines the answers. Only correct buttons have correct answers.
Answer = new Array("",
                  "","","","","None","", //Answers for 1 thru 6 buttons
                  "","","","EM","","",   //Answers for 7 thru 12 buttons
                  "","","","","None","", //Answers for 13 thru 18 buttons
                  "TR","",               //Answers for 19 & 20 elements
                  "TD","",               //Answers for 21 & 22 elements
                  "relative","",         //Answer for 23 & 24 elements
                  "width");              //Answer for 25 element


// Below defines the computescore function.
function computescore ()  // Name the function to be defined
{                         // Start the function definition
  var nCorrect=0;         // Set the variables to their starting values
  var nItems = 7;         // Now = 7
  var nRadios = 18;       // New to separate the radio button items
  var score = 0;

  for (i=1; i<=nRadios; i++)   // For the 1st to the 18th button repeat
  {                            // the following series of commands
    if ( (document.PE1.elements[i].value == Answer[i]) && // If button correct
         (document.PE1.elements[i].checked == true) )     // & checked
      nCorrect+=1;                                        // Add 1 to nCorrect
  }

 // Below added for items 4 & 5
 for (i=nRadios+1; i<=nRadios+3; i++)
  {
    item=document.PE1.elements[i].selectedIndex;
    if (document.PE1.elements[i].options[item].text == Answer[i])
      nCorrect+=1;  
  }

 // Below added for items 6 & 7
 for (i=nRadios+5; i<=nRadios+7; i++)
  {
    if (document.PE1.elements[i].value == Answer[i])
      nCorrect+=1;
  }

  score = (Math.floor((nCorrect/nItems)*10000+0.5))/100;  //Compute % & Round
  return score;                                           //Return score when
                                                          //function executes
}


function emailResults(form) {
  var header = "";
  var emailData="";

  header += "\nTitle:  " + document.title + "\n";                 //Header Info
  header += "From: " + document.location + "\n\n";
  emailData+="NAME:  "+document.PE1.ID.value + "\n";

  //Below is for radio button items 1, 2 & 3
  emailData+="PE 1 Button 5: "+document.PE1.Q1[4].checked + "\n"; //Correct
  emailData+="PE 2 Button 10:"+document.PE1.Q2[3].checked + "\n"; //Button
  emailData+="PE 3 Button 17: "+document.PE1.Q3[4].checked + "\n";//Responses

  //Below is for items 4 & 5
  index=document.PE1.Q4.selectedIndex;
  emailData+="PE 4 Element 19: "+document.PE1.Q4.options[index].text + "\n";
  index=document.PE1.Q5.selectedIndex;
  emailData+="PE 5 Element 21: "+document.PE1.Q5.options[index].text + "\n";

  //Below is for items 6, 7 & 8
  emailData+="PE 6 Element 23: "+document.PE1.Q6.value +"\n";
  emailData+="PE 7 Element 25: "+document.PE1.Q7.value +"\n";
  emailData+="PE 8 Element 27:\n"+document.PE1.Q8.value +"\n";

  emailData+="SCORE: "+computescore() + "\n";
  form.maildata.value = header + emailData;
  alert("This is what is being submitted to the instructor.   " + form.action + '       '+
    form.maildata.value);
  return true;
}


function itemfeedback (elementNo)
{
  //First condition below is for radio buttons
  if ((elementNo > 0) && (elementNo < 18))
  {
    if ( (document.PE1.elements[elementNo].value == Answer[elementNo]) &&
         (document.PE1.elements[elementNo].checked == true) )
      {
       alert("Good work! "+"\""+document.PE1.elements[elementNo].value+
       "\""+" is correct.");
      }
       else
       {
          alert("Your response is not correct.  Try again.");
       }
  }

  else

    //Next condition is for items 4 & 5 - select elements
    if ((elementNo > 18) && (elementNo < 23))
     {
       var item=document.PE1.elements[elementNo].selectedIndex;

       if (document.PE1.elements[elementNo].options[item].text==Answer[elementNo])
       {
       alert("Good work! "+"\""+document.PE1.elements[elementNo].options[item].text+
       "\""+" is correct.");
       }
         else
         {
          alert("\""+document.PE1.elements[elementNo].options[item].text+"\""+
            " is not correct.  Try again.");
         }
     }

    else

    //Final condition below is for items 6 - 8 text & textarea elements
      {
        if (document.PE1.elements[elementNo].value == Answer[elementNo])
        {
        alert("Good work! "+"\""+document.PE1.elements[elementNo].value+
        "\""+" is correct.");
        }
          else
          {
          alert("\""+document.PE1.elements[elementNo].value+"\""+
            " is not correct.  Try again.");
          }
      }
}

// -->
</SCRIPT>

Remember, JavaScript functions need to be declared in the HEAD part of the HTML document to assure they are available when needed. Also they must be contained in a SCRIPT element to inform the browser that it is a JavaScript script and not HTML. The complete HTML document containing the function declarations then appears as shown in example 4.1 below.

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 31 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Example HTML Document:
JavaScript Exercises
HTML
Example:
Example 4.1
HTML Text: JavaScript Exercises Example (includes JavaScript).

Browser Display produced when a document containing the above HTML text is loaded by a browser.

Using HTML/JavaScript Examples as Models. As you have seen, it is a relatively straightforward matter, to use JavaScript functions for scoring, email of form results, and immediate feedback, with a great range of form elements. You can use the examples in this hypertutorial as models and adapt the working functions to your tasks. The process is vastly simplified by the fact that you can treat such functions or sections of JavaScript statements as blocks. You can then cut and paste the blocks, copying whole sections of JavaScript into your documents; and then make the frequently relatively minor adaptations needed to achieve your goals.

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 32 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Further Form Element Values Question Review
Question 1: Which form element entries can you read using the VALUE attribute?

No Response
RADIO
CHECKBOX
SELECT
TEXT


Further Form Element Values Question Review
Question 2: Reading which form element entries require reading the checked property?

No Response
RADIO
SELECT
TEXT


Further Form Element Values Question Review
Question 3: Which form element requires you to read a selectedIndex property to get at the element's entered response?

No Response
RADIO
CHECKBOX
SELECT
TEXTAREA


Further Form Element Values Question Review
Question 4: Which form element requires you to read a text property to get at the element's entered response?

No Response
RADIO
CHECKBOX
SELECT
TEXTAREA


Further Form Element Values Question Review
Question 5: Which form element entries can you read using the VALUE attribute?

No Response
TEXTAREA
CHECKBOX
SELECT
RADIO


Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 33 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Example HTML/JavaScript Documents:
Hypermedia Instruction With Scoring, Email and Feedback

Now, for two final comprehensive examples of complete HTML/JavaScript instructional documents. Both synthesize the HTML, HTML form elements, and JavaScript components you have used into complete Web-based hypermedia instructional systems. Both were created using the Hypermedia Instructional Systems Development Model. The second example in particular, an earlier version of Chapter 1 from Web-based Hypermedia Courseware Development using HTML and JavaScript, implements and demonstrates many of the features of a hypertutor system.

Example HTML Document: Heart Attack: Reducing the Risks!.
The first example document, Heart Attack: Reducing the Risks!, is an example of a simple frame-based CAI/CBT instructional sequence. The information is from an article by Dr. Michael Debakey published in the World Book Encyclopedia. It includes, relative screen positioning using table, form elements, JavaScript scoring, immediate feedback and emailing of results. Study, the HTML/JavaScript and try out the instruction. Notice that because a relative table is used to format each frame, when the display window is resized, the frame resizes along with it, maintaining relative positions of display components. HTML tables make this relatively sophisticated screen control a relatively simple matter to accomplish.

Note: Prompts in the bottom right corner of the screen provide links to next and previous frames. Using these hyperlinks accurately position next and previous frames on the screen for easy viewing. It is suggested you use these for navigation. Keep in mind, however, that because there is no "exit" button within the document, you will need to press the "back" button about the same number of times you clicked on the bottom right corner page links, to come back to this hypertutorial after completing your tour of the document.

Example HTML Document:
Heart Attack: Reducing the Risks!
HTML
Example:
Example 4.2
HTML Text: Heart Attack: Reducing the Risks!.

Browser Display produced when a document containing the above HTML text is loaded by a browser. Note: This is a complete frame-based hypermedia instructional presentation. Although, you have not previously seen it, the <DIV> element (for document divisions) is used to properly align the text links for navigation between previous and next pages. When you have finished interacting with the document press the "back" button the same number of times you moved forward to return to Chapter 4 of the hypertutorial.
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 34 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development
Example HTML Document: Web-based Hypermedia Courseware Development with HTML and JavaScript: Chapter 1.
Now, for the final complete Web-based hypermedia example courseware document -- an earlier draft of Chapter 1 from this hypertutorial: Web-based Hypermedia Courseware Development with HTML and JavaScript. The example illustrates how far you have progressed already. Using the HTML/JavaScript features previously introduced during this hypertutorial, Chapter 1 provides a powerful example of what can be achieved fairly quickly with instructional hypermedia in the HTML/JavaScript Web browser environment. The Chapter 1 example implements many features of hypertutor systems.

The example includes, relative screen positioning using HTML tables, HTML form elements, JavaScript scoring, immediate feedback and emailing of results. It links to a hypertext table of contents and embeds hypertext links to important concepts throughout the chapter. It employs many of the Hypertutor Model learner control, presentation, practice, feedback and learning resources features.

Study, the HTML/JavaScript. You've already experienced the instruction. You probably already noticed that display window contents automatically accomodate to window resizing except in extreme situations with preformatted documents having long lines of text without line breaks. Screen elements generally are repositioned to fit correctly within display windows using relative positioning principles, primarily using relative tables.

HTML Example Document:
Web-based Hypermedia Courseware Development with HTML and JavaScript: A Hands-on Introduction
Chapter 1
HTML
Example:
Example 4.3
HTML Text: Web-based Hypermedia Courseware Development with HTML and JavaScript, Ch. 1. Note: This document is large enough that it may not fit in your clipboard if you wish to copy and paste the document into your editor. In that case simply copy and paste the first half into your editor and then copy and paste the second half separately, appending it at the end of the first half of the document.

Browser Display Note: This example is an earlier version of the complete Chapter 1 tutorial document. You have now had experience with all HTML and JavaScript elements used in the production of that document.
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 35 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Summary

You have come a long way rather quickly in your efforts to achieve your Web authoring goals and objectives. You now know how to use HTML and JavaScript to put together complete Web-based Hypermedia Instructional Systems. These systems can be constructed using steps outlined in the Hypermedia Instructional Systems Development Model while adhering to the hypermedia design prescriptions of the Hypertutor Model.

You have expanded your JavaScript scoring, email and immediate feedback skills to include a wider variety of form elements including radio buttons, checkboxes, select elements, text elements and textarea elements. Considered together, this combination of form elements covers most of the bases for instructional item formats.

You have hands-on experience with hundreds of HTML and JavaScript document and form element examples. You also have learned how you can adapt the complete HTML and JavaScript document examples presented in this chapter and throughout the hypertutorial to your own needs, using them as models or templates

Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 36 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

Additional Hands-On Practice Project Assignment

It is always more efficient when developing Web-based courseware to adapt an existing working document to one's own purposes than to have to start from scratch to create a whole new document, building from the ground floor up without a model. So, keeping that in mind, enter your favorite word processor (e.g., WordPerfect) or text editor (e.g., Windows Notepad) and choose one of the possible projects below. Then choose the appropriate example document to use as a model or template for adaptation to your own purposes.

Copy the chosen example document, as described in the "Edit, Save, Reload and Test" section earlier in this tutorial, into the word processor and use the "Save as" option to save it under a new name of your own choosing. Then use the edit, save, reload and test development process to edit the newly saved example HTML document to produce one or more of the following Web-based hypermedia courseware products to meet your own instructional goals.

    List of Possible Projects:

  1. A Simple Web-based Frame-oriented CAI/CBT Instructional Document (example HTML document is Example 4.2)
  2. A Simple Hypermedia Instructional System (example HTML document is Example 4.3)
  3. Other Hypermedia Instructional System (choose your own).

End Chapter 4: Web-based Hypermedia Instruction
Using HTML & JavaScript


Copyright © 1997 Craig Johnson
Comments:
cjohnson@acad1.sahs.uth.tmc.edu
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 37 UT Bullet

UT Bullet Web-based Hypermedia Courseware Development

References

  1. Anderson, R. C., & Pichert, J. W. Recall of Previously Unrecallable Information following a Shift in Perspective. (Tech. Rep. No. 41). Urbana: University of Illinois, Center for the Study of Reading. (ERIC Document Reproduction Service No. ED 142974, 1987.)
  2. Arnheim, R. Visual Thinking, Berkeley and Los Angeles: University of California Press, 1969.
  3. Craik, F. I. M., & Lockhart, R. S. Levels of Processing: A Framework for Memory Research. Journal of Verbal Learning and Verbal Behavior, 1972, 11, 671-684.
  4. Dwyer, F. M. Strategies for Improving Visual Learning: A Handbook for the Effective Selection, Design, and Use of Visual Materials. State College, PA: Penn State, 1978.
  5. Flanagan, D. JavaScript: The Definitive Guide (Beta Edition). Sebastopol, CA: O'Reilly, 1996.
  6. Fleming, M. L. Perceptual Principles for the Design of Instructional Materials. Viewpoints, Bloomington: Indiana University Bulletin of the School of Education, 69-200, 1970.
  7. Fleming, M., & Levie, W. H. Instructional Message Design. Englewood Cliffs, NJ: Educational Technology Publications, 1978.
  8. Fleming, M., & Levie, W. H. (Eds.)Instructional Message Design: Principles from the Behavioral and Cognitive Sciences. (2nd Edition). Englewood Cliffs, NJ: Educational Technology Publications, 1993.
  9. Goodman, D. Danny Goodman's JavaScript Handbook. Foster City, CA: IDG, 1996.
  10. Graham, I. S. The HTML Sourcebook. New York: Wiley, 1995.
  11. Jelden, D. L., & Brown, B. R. A Generalized Learner-Controlled Education System. Journal of Educaitonal Technology Systems, 1982-83, 11(1), 3-21.
  12. Johnson, C. W., & Grover, P. A. Hypertutor Therapy for Interactive Instruction. Educational Technology, 1993, 33(1), 5-16.
  13. Kinzie, M. B. Requirements and Benefits of Effective Interactive Instruction: Learner Control, Self-Regulation, and Continuing Motivation, Educational Technology, Research and Development, 1990, 38(1), 5-21.
  14. Kinzie, M. B., & Birdel, R. L. Design and Use of Hypermedia Systems, Educational Technology, Research and Development, 1990, 38(3), 61-68.
  15. Morgan, M., Wandling, J. & Casselberry, R. Webmster Expert Solutions. Indianapolis, IN: Que, 1996.
  16. Pressley, M., McDaniel, M. A., Turnure, J., Wood, E., & Ahmad, M. Generation and Precision of Elaboration: Effects on Intentional and Incidental Learning. Journal of Experimental Psychology: Learning, Memory, and Cognition, 1987, 13, 291-300.
  17. Ritchey, T. Programming JavaScript for Netscape 2.0. Indianapolis, IN: New Riders, 1996.
  18. Shafer, D., JavaScript & Netscape Wizardry. Scottsdale, AZ: Coriolis, 1996.
  19. Stout, R. The World Wide Web Complete Reference. Berkeley, CA: McGraw-Hill, 1996.
  20. Zimmerman, B. J. Self-Regulated Learning and Academic Achievement: An Overview. Educational Psychologist, 1990, 25, 3-17. Indianapolis, IN: New Riders, 1996.
Chapter 4: Web-based Hypermedia Instruction with HTML and JavaScript 4 - 38 UT Bullet