Script Categories

Miscellaneous >>> Directory.

If you were thinking about creating a searchable directory, this script can help. Just cut and paste the script, edit the appropriate directory information, and you have your own Javascript directory!

Company Directory A B C D E
Instructions: Simply "click the letter of the firstK L M N O
initial of the last name of the person desired.P Q R S T
Then "click" the Find button.U V W X Y
Telephone Directory Results

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
var rcrd = new initArray("4b","5b","8b","8b");
/* Simply "load" this array with your names appropriate to the letters. (A=0,
Z=25)  If you have no names beginning with "I", for example, simply do not
define that record (rcrd[8]) just as we have done here.  The "backslash r" is
used to initiate a new line in the display on screen. */
rcrd[0] = "Gracie Allen, Bookkeeping, Tel. 234-5678 ext 13"
+ "\rHarold Ammons, Engineering, Tel. 777-0987 ext 23"
+ "\rJames Atkin, Research and Development, Tel. 777-0933 ext 17";
rcrd[1] = "George Burns, Public Relations, Tel. 232-5178 ext 91"
+ "\rAnne Byzantine, Political Liasson, Tel. 456-0987 ext 33";
rcrd[2] = "Harrison Czar, Administration, Tel. 232-5178 ext 12";
rcrd[3] = "Dillard Dally, Corporate Efficiency, Tel. 232-5178 ext 88 "
+ "email:"
+ "\rSandy Dodge, Secretarial, Tel. 456-6543 ext 44";
rcrd[4] = "Heloise Eloise, Human Relations, Tel. 232-2909 ext 59"
+ "\rJerry Ezzard, Political Liasson, Tel. 456-9800 ext 41";
rcrd[5] = "George Fatchance, Corporate Lending, Tel. 546-7712 ext 19"
+ "\rBjorn Fjord, Foreign Relations, Tel. 456-6651 ext 28";
rcrd[6] = "Oprah Gagnon, Media Relations, Tel. 232-5178 ext 12";
rcrd[7] = "Sally Hopkins, Administration, Tel. 339-7081 ext 3";
rcrd[9] = "Bo Jackson, Public Relations, Tel. 232-5178 ext 12"
+ "\rAnne Johnson, Political Liasson, Tel. 456-0987 ext 33";
rcrd[10] = "Gary Kapperson, Public Relations, Tel. 232-5178 ext 12"
+ "\rAdam Kotch, Political Liasson, Tel. 456-5543 ext 31";
rcrd[11] = "Bunny Lane, Operations, Tel. 232-3812 ext 16"
+ "\rFranz Lizt, Entertainment Operations, Tel. 456-0987 ext 90";
rcrd[12] = "Drake Mallard, Administration, Tel. 712-6622 ext 4"
+ "\rAllison Majors, Operations, Tel. 456-6908 ext 24";
rcrd[13] = "George Nabors, Marketing, Tel. 232-4009 ext 11"
+ "\rTabitha Noonan, Accounts Receivable, Tel. 332-6755 ext 57";
rcrd[15] = "Mary Payton, Accounts Receivable, Tel. 217-2233 ext 58"
+ "\rJohn Pyne, Marketing, Tel. 456-5002 ext 2";
rcrd[17] = "Claude Raines, Corporate History, Tel. 533-2203 ext 14"
+ "\rBabs Reese, Marketing, Tel. 456-0987 ext 33";
rcrd[18] = "Terri Samuelson, Public Relations, Tel. 232-4090 ext 62"
+ "\rSally Smith, Marketing, Tel. 456-3321 ext 65";
rcrd[19] = "John Thomas, Administration, Tel. 598-7202 ext 66"
+ "\rThomas Tuttle, Political Liasson, Tel. 456-5231 ext 15";
rcrd[21] = "Sarah Vaughn, Administration, Tel. 232-7211 ext 68"
+ "\rVictor Victor, Engineering, Tel. 456-7450 ext 23";
rcrd[22] = "George Watkins, Research and Development, Tel. 882-2834 ext 63"
+ "\rAnne Wylie, Mailroom, Tel. 855-2200 ext 42";
rcrd[24] = "Patti Yarrow, Administration, Tel. 232-5178 ext 12";
function dataBase(isnform) {
for (var i = 0; i < 26; i++) {
if (isnform.alpha[i].checked) {
recnum = isnform.alpha[i].value;
if (rcrd[recnum] != null) {
document.isnform.display.value = rcrd[recnum];
else document.isnform.display.value = "Sorry, no listings for that letter.";
// End -->
<FORM NAME="isnform">
<B>Company Directory</B></TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="0" CHECKED>A</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="1">B</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="2">C</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="3">D</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="4">E</TD></TR>
<INPUT TYPE="radio" NAME="alpha" VALUE="5">F</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="6">G</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="7">H</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="8">I</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="9">J</TD></TR>
<FONT SIZE=1><B>Instructions: </B> Simply "click the letter of the
</FONT></TD><TD><INPUT TYPE="radio" NAME="alpha" VALUE="10">K</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="11">L</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="12">M</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="13">N</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="14">O</TD></TR>
<FONT SIZE=1>initial of the last name of the person
</FONT></TD><TD><INPUT TYPE="radio" NAME="alpha" VALUE="15">P</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="16">Q</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="17">R</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="18">S</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="19">T</TD></TR>
<FONT SIZE=1>Then "click" the Find button.</FONT></TD><TD><INPUT TYPE="radio" NAME="alpha" VALUE="20">U</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="21">V</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="22">W</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="23">X</TD>
<INPUT TYPE="radio" NAME="alpha" VALUE="24">Y</TD></TR>
ALIGN=CENTER><INPUT TYPE="button" NAME="but" VALUE=" Find " onClick="dataBase(this.form)"></TD><TD></TD><TD></TD><TD><INPUT
"radio" NAME="alpha" VALUE="25">Z</TD>
ALIGN=CENTER>Telephone Directory Results<BR>
<TEXTAREA NAME="display" ROWS=4 COLS=55 WRAP=yes>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!). . Bitcoin Gambling - The Original Crypto Dice Game