Trying to write a button whose link captures a JS variable.
The button, name='MajorRev', isn't being created.
Nor is the variable 'MajorRecords' being populated.
The page is fairly complex.

Here's the code for the main page:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<HTML>
<HEAD>
<title>Database edit page</title>
<META NAME="EXPIRES" CONTENT="Mon, 01 Jan 2000 12:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<script src="javascript.js" type="text/javascript"></script>

</HEAD>
	<body marginheight="0" topmargin="0" onload="hidden()">

<!-- Form Border image and -->
	<div style="position: absolute; left: 5%;">

<!-- Beginning of form input -->

<form name="f1" enctype="multipart/form-data" action="dataResolver.php" method="POST">

	  <!-- Page sub-title -->
	<p class="style3">
	  <span style='position: absolute; width: 275px; left: 300px; top: 420px; z-index:40'><b>DATABASE UPDATE</b></span>
	</p>
	
      <!-- Table positioning -->
	<div style="position: absolute; width: 635px; left: 40px; top: 85px; z-index:1">

<table width='631' cellspacing='0'>
	<thead>
		<tr><th colspan="2" bgcolor='#FFFFDF'>Add, Edit or Delete information</th>
		</tr>
	</thead>

	<tr bgcolor='#E0E0E0'>
		<td width="481">&nbsp;Majors:&nbsp;<select name="Major" id="MajorChoice" onchange="show('MajorEdit'); hide('MinorEdit'); hide('ConcenEdit'); hide('TheologyEdit'); hide('MajorAdd'); hide('MinorAdd'); hide('ConcenAdd'); hide('TheologyAdd'); testMajor(this); document.getElementById('MinorChoice').selectedIndex=0; document.getElementById('ConcenChoice').selectedIndex=0; document.getElementById('TheolChoice').selectedIndex=0"></select></td>
		<td width="150">
	<!-- Add Edit Delete buttons -->
		&nbsp;<input type="button" value="Add" name="MajAdd" id="MajAdd" onclick="show('MajorAdd'); hide('MajorEdit'); hide('TheologyEdit'); hide('ConcenEdit'); hide('ConcenAdd'); hide('MinorEdit'); hide('MinorAdd'); hide('TheologyAdd'); document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('MinorChoice').selectedIndex=0; document.getElementById('ConcenChoice').selectedIndex=0; document.getElementById('TheolChoice').selectedIndex=0">
		&nbsp;<input type="button" value="Delete" name="MajorDelete" onclick="resolveData();">
		</td>
	</tr><tr>

		<td>
		&nbsp;<div name="MajorAdd" id="MajorAdd" style='display: none'>
		&nbsp;&nbsp;<b>Add</b> a Major.
		<input type='text' id='Majorcode' name='MajorCode' size='4' maxlength='4'>
		<input type='text' id='Majors' name='Majors' size='35' maxlength='50'><br>
		&nbsp;&nbsp;<input type="submit" value="Add Major" name="Add Major" title="Add Major" onclick="this.form.action='DBAddMajor.php'"><p>
		</div>
		<div id="MajorEdit" name="MajorEdit" style='display: none'>

		&nbsp;&nbsp;<b>Edit</b> a Major.
		<input type="text" name="MajorEdit" id="MajorEdit" size="4" onclick="activeMajorRev()">
		<!--<input type="text" name="MajorEdit2" id="MajorEdit2" size="35" onchange="update(this.value, 'MajorEdit3')">-->
		<input type="text" name="MajorEdit2" size="35" onclick="activeMajorRev()">
		<!-- Record number -->

		<input type="text" name="MajorEdit3" id="MajorEdit3" size="3" onchange="MajorEdit3=this.value; resolveData()">
		<br>

		<script type="text/javascript">document.write"
		&nbsp;&nbsp;<a href='DBEditMajor.php?record="+MajorRecords+"'><input disabled type='button' value='Save revisions' name='MajorRev' id='MajorRev' title='Store Major revisions' onClick='resolveData()'></a>"</script>
		<p></div>
		</td>
	</tr>

	<tr bgcolor='#E0E0E0'>
		<td width="481">&nbsp;Minors:&nbsp;<select name="Minor" id="MinorChoice" onchange="show('MinorEdit'); hide('MajorEdit'); hide('ConcenEdit'); hide('TheologyEdit'); hide('MinorAdd'); hide('MajorAdd'); hide('ConcenAdd'); hide('TheologyAdd'); testMinor(this); document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('ConcenChoice').selectedIndex=0; document.getElementById('TheolChoice').selectedIndex=0"></select></td>
		<td width="150">

	<!-- Add Edit Delete buttons -->
		&nbsp;<input type="button" value="Add" name="MinAdd" id="MinAdd" onclick="show('MinorAdd'); hide('MinorEdit'); hide('TheologyEdit'); hide('ConcenEdit'); hide('ConcenAdd'); hide('MajorEdit'); hide('MajorAdd'); hide('TheologyAdd'); document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('ConcenChoice').selectedIndex=0; document.getElementById('TheolChoice').selectedIndex=0; document.getElementById('MinorChoice').selectedIndex=0">
		&nbsp;<input type="button" value="Delete" name="MinorDelete" onclick="resolveData();">
		</td>
	</tr><tr>
		<td>
		&nbsp;<div id="MinorAdd" name="MinorAdd" style='display: none'>
		&nbsp;&nbsp;<b>Add</b> a Minor.
		<input type='text' id='MinorCode' name='MinorCode' size='4' maxlength='4'>

		<input type='text' id='Minor' name='Minors' size='35' maxlength='50'><br>
		&nbsp;&nbsp;<input type="submit" value="Add Minor" name="Add Minor" title="Add Minor" onclick="this.form.action='DBAddMinor.php'"><p>
		</div>
		<div id="MinorEdit" name="MinorEdit" style='display: none'>
		&nbsp;&nbsp;<b>Edit</b> a Minor.
		<input type="text" name="MinorEdit" id="MinorEdit" size="4" onclick="activeMinorRev()">
		<input type="text" name="MinorEdit2" size="35" onclick="activeMinorRev()">
		<input type="hidden" name="MinorEdit3" size="3"><br>

		&nbsp;&nbsp;<input disabled type="submit" value="Save revisions" name="MinorRev" id="MinorRev" title="Store Minor revisions" onclick="this.form.action='DBEditMinor.php'; resolveData();">
		<p></div>
		</td>
	</tr>

	<tr bgcolor='#E0E0E0'>
		<td width="481">&nbsp;Concentrations:&nbsp;<select name="Concen" id="ConcenChoice" onchange="show('ConcenEdit'); hide('MajorEdit'); hide('MinorEdit'); hide('TheologyEdit'); hide('ConcenAdd'); hide('MajorAdd'); hide('MinorAdd'); hide('TheologyAdd'); testConcen(this); document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('MinorChoice').selectedIndex=0; document.getElementById('TheolChoice').selectedIndex=0"></select></td>
		<td width="150">
	<!-- Add Edit Delete buttons -->

		&nbsp;<input type="button" value="Add" name="ConcAdd" id="Add" onclick="hide('ConcenEdit'); hide('TheologyEdit'); hide('MinorEdit'); hide('MinorAdd'); hide('MajorEdit'); hide('MajorAdd'); hide('TheologyAdd'); show('ConcenAdd'); document.getElementById('ConcenChoice').selectedIndex=0; document.getElementById('TheolChoice').selectedIndex=0; document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('MinorChoice').selectedIndex=0;">
		&nbsp;<input type="button" value="Delete" name="ConcenDelete" onclick="resolveData();">
		</td>
	</tr><tr>
		<td>
		&nbsp;<div id="ConcenAdd" name="ConcenAdd" style='display: none'>
		&nbsp;&nbsp;<b>Add</b> a Concentration.
		<input type='text' id='ConcenCode' name='ConcenCode' size='4' maxlength='4'>

		<input type='text' id='Concen' name='Concen' size='35' maxlength='50'><br>
		&nbsp;&nbsp;<input type="submit" value="Add Concentration" name="Add Concentration" title="Add Concentration" onclick="this.form.action='DBAddConcen.php'"><p>
		</div>
		<div id="ConcenEdit" name="ConcenEdit" style='display: none'>
		&nbsp;&nbsp;<b>Edit</b> a Concentration.
		<input type="text" name="ConcenEdit" id="ConcenEdit" size="4" onclick="activeConcenRev()">
		<input type="text" name="ConcenEdit2" size="35" onclick="activeConcenRev()">
		<input type="hidden" name="ConcenEdit3" size="3"><br>

		&nbsp;&nbsp;<input disabled type="submit" value="Save revisions" name="ConcenRev" id="ConcenRev" title="Store Concentration revisions" onclick="this.form.action='DBEditConcen.php';resolveData();">
		<p></div>
		</td>
	</tr>

	<tr bgcolor='#E0E0E0'>
		<td width="481">&nbsp;School of Theology majors:&nbsp;<select name="Theology" id="TheolChoice" onchange="show('TheologyEdit'); hide('ConcenEdit'); hide('MinorEdit'); hide('MajorEdit'); hide('TheologyAdd'); hide('ConcenAdd'); hide('MinorAdd'); hide('MajorAdd'); testTheology(this); document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('MinorChoice').selectedIndex=0; document.getElementById('ConcenChoice').selectedIndex=0"></select></td>
		<td width="150">
	<!-- Add Edit Delete buttons -->

		&nbsp;<input type="button" value="Add" name="TheolAdd" id="Add" onclick="hide('TheologyEdit'); hide('ConcenEdit'); hide('ConcenAdd'); hide('MinorEdit'); hide('MinorAdd'); hide('MajorEdit'); hide('MajorAdd'); show('TheologyAdd'); document.getElementById('TheolChoice').selectedIndex=0; document.getElementById('MajorChoice').selectedIndex=0; document.getElementById('MinorChoice').selectedIndex=0; document.getElementById('ConcenChoice').selectedIndex=0;">
		&nbsp;<input type="button" value="Delete" name="TheologyDelete" onclick="resolveData();">
		</td>
	</tr><tr>
		<td>
		&nbsp;<div id="TheologyAdd" name="TheologyAdd" style='display: none'>
		&nbsp;&nbsp;<b>Add</b> a Theology major.
		<input type='text' id='TheologyCode' name='TheologyCode' size='4' maxlength='4'>

		<input type='text' id='Theology' name='Theology' size='35' maxlength='50'><br>
		&nbsp;&nbsp;<input type="submit" value="Add Theology Major" name="Add Theology Major" title="Add Theology Major" onclick="this.form.action='DBAddTheology.php'"><p>
		</div>
		<div id="TheologyEdit" name="TheologyEdit" style='display: none'>
		&nbsp;&nbsp;<b>Edit</b> a Theology major.
		<input type="text" name="TheologyEdit" id="TheologyEdit" size="4" onclick="activeTheolRev()">
		<input type="text" name="TheologyEdit2" size="35" onclick="activeTheolRev()">
		<input type="hidden" name="TheologyEdit3" size="3"><br>

		&nbsp;&nbsp;<input disabled type="submit" value="Save revisions" name="TheolRev" id="TheolRev" title="Store Theology revisions" onclick="this.form.action='DBEditTheology.php'; resolveData();">
		<p></div>
		</td>
	</tr>

	<tfoot>
		<tr><td colspan='4' bgcolor='#FFFFDF'>&nbsp;</td></tr>
	</tfoot>
</table>
</DIV>

</form>

<script type="text/javascript">
	var empMajorChoice = [		['1','Please Choose One','Please Choose One'],['2','AMST','American Studies'],['3','ANGL','Anglican Studies'],['4','ANTH','Anthropology'],['5','ART','Art'],['6','ARTH','Art History'],['7','ASIA','Asian Studies'],['8','BIBL','Bible'],['9','BIOL','Biology'],['10','CEMT','Christian Ethics Moral Theology']	];
//Collecting of paired data for Major presentation
for(var a=0;a<empMajorChoice.length;a++){
document.f1.MajorChoice[document.f1.MajorChoice.length] = new Option(empMajorChoice[a][2],empMajorChoice[a][1],empMajorChoice[a][0],empMajorChoice[a][3])
}


	var empMinorChoice = [
		['1','Please Choose One','Please Choose One'],['2','ANTH','Anthropology'],['3','ARTH','Art History'],['4','ASIA','Asian Studies'],['5','BIOC','BioChemistry'],['6','BIOL','Biology'],['7','CHEM','Chemistry'],['8','CSCI','Computer Science'],['9','ECON','Economics'],['10','ENVS','Environmental Studies']	];
//Collecting of paired data for Minor presentation
for(var b=0;b<empMinorChoice.length;b++){
document.f1.MinorChoice[document.f1.MinorChoice.length] = new Option(empMinorChoice[b][2],empMinorChoice[b][1],empMinorChoice[b][0],empMinorChoice[b][3])
}


	var empConcenChoice = [
		['1','','Please Choose One'],['2','EDU','Education'],['3','WMST','Womens Studies']	];
//Collecting of paired data for Concentration presentation
for(var c=0;c<empConcenChoice.length;c++){
document.f1.ConcenChoice[document.f1.ConcenChoice.length] = new Option(empConcenChoice[c][2],empConcenChoice[c][1],empConcenChoice[c][0],empConcenChoice[c][3])
}


	var empTheolChoice = [
		['1','','Please Choose One'],['2','BIBL','Bible'],['3','CEMT','Christian Ethics Moral Theology'],['4','CHHT','Church History Historical Theology'],['5','HOML','Homiletics'],['6','LTCM','Liturgics and Church Music'],['7','MNST','Ministry Theory and Practice'],['8','SPRT','Spirituality'],['9','THEO','Theology Systematic'],['15','NEW','THEOLOGY MAJOR IE']	];
//Collecting of paired data for Theology presentation
for(var d=0;d<empTheolChoice.length;d++){
document.f1.TheolChoice[document.f1.TheolChoice.length] = new Option(empTheolChoice[d][2],empTheolChoice[d][1],empTheolChoice[d][0],empTheolChoice[d][3])
}
</script>
</DIV>
</BODY>
</HTML>

Included page code:
Code:
//Revealing edit fields based upon selection
//Major
function hide(){
var MajorEdit = document.getElementById(arguments[0]);
MajorEdit.style.display="none";
}
function show(){
var MajorEdit = document.getElementById(arguments[0]);
MajorEdit.style.display="";
}
//Minor
function hide(){
var MinorEdit = document.getElementById(arguments[0]);
MinorEdit.style.display="none";
}
function show(){
var MinorEdit = document.getElementById(arguments[0]);
MinorEdit.style.display="";
}
//Concentration
function hide(){
var ConcenEdit = document.getElementById(arguments[0]);
ConcenEdit.style.display="none";
}
function show(){
var ConcenEdit = document.getElementById(arguments[0]);
ConcenEdit.style.display="";
}
//Theology
function hide(){
var TheologyEdit = document.getElementById(arguments[0]);
TheologyEdit.style.display="none";
}
function show(){
var TheologyEdit = document.getElementById(arguments[0]);
TheologyEdit.style.display="";
}

//Revision submission button status
function activeMajorRev(){
	document.f1.MajorRev.disabled = false;
}
function activeMinorRev(){
	document.f1.MinorRev.disabled = false;
}
function activeConcenRev(){
	document.f1.ConcenRev.disabled = false;
}
function activeTheolRev(){
	document.f1.TheolRev.disabled = false;
}

// Populating Major Edit fields
function testMajor(objMajor){
if(objMajor.selectedIndex!=0){
document.f1.MajorEdit.value=empMajorChoice[objMajor.selectedIndex][1]
document.f1.MajorEdit2.value=empMajorChoice[objMajor.selectedIndex][2]
document.f1.MajorEdit3.value=empMajorChoice[objMajor.selectedIndex][0]
} else {
	document.f1.MajorEdit.value="";
	document.f1.MajorEdit2.value="";
	document.f1.MajorEdit3.value="";
}
}

// Populating Minor fields
function testMinor(objMinor){
if(objMinor.selectedIndex!=0){
document.f1.MinorEdit.value=empMinorChoice[objMinor.selectedIndex][1]
document.f1.MinorEdit2.value=empMinorChoice[objMinor.selectedIndex][2]
document.f1.MinorEdit3.value=empMinorChoice[objMinor.selectedIndex][0]
} else {
	document.f1.MinorEdit.value="";
	document.f1.MinorEdit2.value="";
	document.f1.MinorEdit3.value="";
}
}

// Populating Concentration fields
function testConcen(objConcen){
if(objConcen.selectedIndex!=0){
document.f1.ConcenEdit.value=empConcenChoice[objConcen.selectedIndex][1]
document.f1.ConcenEdit2.value=empConcenChoice[objConcen.selectedIndex][2]
document.f1.ConcenEdit3.value=empConcenChoice[objConcen.selectedIndex][0]
} else {
	document.f1.ConcenEdit.value="";
	document.f1.ConcenEdit2.value="";
	document.f1.ConcenEdit3.value="";
}
}
// Populating Theology fields
function testTheology(objTheology){
if(objTheology.selectedIndex!=0){
document.f1.TheologyEdit.value=empTheolChoice[objTheology.selectedIndex][1]
document.f1.TheologyEdit2.value=empTheolChoice[objTheology.selectedIndex][2]
document.f1.TheologyEdit3.value=empTheolChoice[objTheology.selectedIndex][0]
} else {
	document.f1.TheologyEdit.value="";
	document.f1.TheologyEdit2.value="";
	document.f1.TheologyEdit3.value="";
}
}


// Choose which code to process info and the message to display from dataResolver.php
function resolveData(){
	alert("found function");
	var MajorRecords = document.getElementById("MajorEdit3").nodeValue;
	alert(MajorRecords)