Fellow Forum-ers:
I have the following HTML file
[code=php]
<html>
<head>
<title>Web Scheduling</title>
<script type=”text/javascript” src=”Faculty.js”></script>
</head>
<body>
Currently Selected:
<br /><input id=”FacultyName” type=”text” value=””> Faculty Name
<input id=”SiteName” type=”text” value=””> Site Name
<input id=”Comment” type=”text” value=””> Comments
<p />
<script type=”text/javascript”>
ListFacultyNames();
</script>
</body>
</html>
That calls this ‘Faculty.js’ file
[code=php]
// Faculty Names
var FacultyNames = new Array (
“Amster”,
“Bade”,”Bacigalupi”,”Bartuccio”,”Bejar”,”Besada”,”Black”,”Burns”,
“Calderon”,”Caputo”,”Crandall”,”Coulter”,
“Davis”,”Dufek”,
“Espejo”,
“FAB”,”Falco”,”Fecho”,”Frauens”,
“Gorman”,”Gonzalez”,
“Hunter”,
“Janoff A.”,
“Kabat”,
“Leasher”,
“Najman”,”Nelson”,”Neiberg”,”Nguyen TL”,”Nguyen Thy”,
“Oliver”,
“Patrick”,”Patterson”,”Pearl”,”Pham”,”Pizzimenti”,
“Reed”,
“Resident”,”Resident-CL”,”Resident1″,”Resident2″,”Resident3″,
“Reynolds”,”Rodena”,”Rodman”,”Rouse”,”Rumsey”,
“Saitowitz”,”Schatz”,”Schinas”,”Seger”,”Shechtman”,”Sowka”,
“Taub”,”Tyler”,
“Vollmer”,
“Wagner”,”Woodruff”,”Woods”
)
function ListFacultyNames() {
document.write(‘<select name=”FacultyList”>’);
for (var i=0; i<FacultyNames.length; i++) {
document.write(‘<option value=”‘+FacultyNames[i]+'” />’);
}
document.write(‘</select>’);
}
But it doesn’t create the <select> list.
Any ideas what to change to make it work? ?
I put an ‘alert(FacultyNames[i])’ in the function ‘ListFacultyNames()’ for..loop, and all names appear.