This script performs a data base search to locate records corresponding to one of two
different inputs. In the form below, the inputs are labeled, "Given Name" and "Family Name".
That label, however, is only in the search form and may be altered at will. (The other 2
labels seen on the form, "Birthday" and "e-Mail address" are also only on the form and
may be altered.) The search is performed for substrings as well as for perfect
(except for letter case) matches.
If no matches are found a self closing Pop-Up window will inform you of that fact. (If
you close the window manually, you will get a JS error when it tries to close it.) If
1 match is found the results will appear on the form only. If multiple matches are found,
The results for the first match will appear on the form and a Pop-Up window will list all
the results (including the one shown in the form). This window is not self closing. Performing
additional searches after the window has opened, will result in their hits (results) being appended to
the previous results.
To test the script, I would suggest starting by searching for the "Family Name" Jung. This
should produce no hits. After the Pop-Up window closes, clear the form and search for a
"Given Name" of Carl. This should produce 3 hits. Hitting the search button without
clearing the form will search for both a "Given Name" of Carl and a "Family Name" of Paulson.
This should result in 5 hits
The data is maintained in the form of multiple arrays in file "DataBase.js". A sample file is
provided here to allow testing and inspection. A copy of the data base file and an
example page may be obtained here. To use the script
the file "DataBase.js" must be placed in the same directory as the page that
references it.
I very rarely affix a copyright header to scripts but I have to this one. The script
is freeware and may be used by anyone as long as the header remains intact with the
code.