Commit 328a2545 authored by Arman Sobhi's avatar Arman Sobhi

Moved GAS.js out of template file

parent 63346db3
function addClass() {
var newClass = document.getElementById("classes").value;
var classes = document.getElementById("classesTaken").value;
classes = classes.concat(newClass);
document.getElementById("classesTaken").value = classes + ",";
}
function degreeSelectHandler(degree) {
var yearList = document.getElementById('YearList');
var specializationList = document.getElementById('SpecializationOfDegree');
removeOptions(yearList);
removeOptions(specializationList);
if(degree.value == 'bio') {
addOption("2015","2015",yearList);
addOption("None","none",specializationList);
}
else if (degree.value=='cs') {
addOption("2014","2014",yearList);
addOption("2015","2015",yearList);
addOption("None","none",specializationList);
}
else if(degree.value == 'math') {
addOption("2015","2015",yearList);
addOption("None","none",specializationList);
addOption("Applied","applied",specializationList);
addOption("Mathematics","mathematics",specializationList);
addOption("Statistics","statistics",specializationList);
}
else if(degree.value == 'me') {
addOption("2015","2015",yearList);
addOption("None","none",specializationList);
}
else if(degree.value == 'se') {
addOption("2015","2015",yearList);
addOption("None","none",specializationList);
addOption("Artificial Intelligence and Cognitive Modeling","AICog",specializationList);
addOption("Computer Imaging","compImaging",specializationList);
addOption("Embedded Systems","embedded",specializationList);
addOption("Information Assurance","infoAssurance",specializationList);
addOption("Human-Computer Interaction","HumanCompInteraction",specializationList);
addOption("Networks","networks",specializationList);
}
}
function addOption(text,value,select) {
var option = document.createElement("option");
option.text=text;
option.value=value;
select.add(option);
}
function removeOptions(selectbox) {
var i;
for(i = selectbox.options.length - 1 ; i >= 0 ; i--)
{
selectbox.remove(i);
}
}
......@@ -4,7 +4,7 @@
<h1>Graduation Audit System (GAS)</h1>
<p>This is an automated degree audit system for various degree plans at The University of Texas at Dallas.<br> Note: Audits may take between five seconds to a minute depending on degree plan. </p>
<link rel="stylesheet" type="text/css" href="GAS.css">
<script src="GAS.js"></script>
<script src="../GAS.js"></script>
<form action="/submit" method="post">
<div>
<label for="name">Name:</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment