The SAMPLE TABLE , below, is built from a text file containing
a set of rows where the items are separated by tabs.
The text file the table "draws on" (or is built from) is called "Academy_Awards.txt" It is
located in the same folder/directory as this web page. The first row of this text file
represents the column headings. Each subsequent row represents a table row or record.
Again, each item in each row is tab-separated. Once you get a copy of this web page
(workingon4.html) and a copy of the associated text file (Academy_Awards.txt) on
your own ("local") computer: You may replace the column headings and
contents of each record as desired in the Academy_Awards.txt text file. All you must do
in addition is View the Source of this web page and find the 2 - 6 other mentions of each
column name and replace that column name just as you did in the Academy_Awards.txt file.
You should note that the actual table placed into the browser memory has more columns
or fields than those displayed. YET you may use the 'hidden' columns as the basis for
sorting, just as is done in the existing example table displayed. IN PARTICULAR, in the
example: Best Director Film, Best Actress Film, and Best Actor Film are NOT displayed as
visible columns in the Table, but are used as some of the basis for the select boxes used to sort
the table contents. You may select visible or hidden columns as the basis for your sorting.
TO VIEW THE TEXT FILE USED TO BUILD THE TABLE JUST REPLACE
"workingon4.html" in the web address textbox of your browser with
Academy_Awards.txt If both workingon4.html and Academy_Awards.txt are local (on your machine):
You may then edit this tab-delineated text file. THEN also remember to change
the column names in the source code for workingon4.html in each location necessary.
(Persons viewing this page on the Internet will have to View the Source of workingon4.html
AND SAVE their own local copy. Then go to Academy_Awards.txt and copy the contents and
PASTE a copy of the contents of that text file in a local text file of the same name. THEN,
follow the procedures just described.)
Year
Best Picture
Best Director
Best Actress
Best Actor
Note: This particular table example comes from Danny Goodman's most excellent JavaScript Bible,
4th edition, published by Hungry Minds, Inc. NY:NY (2001)