Hooked up javascript

parent e9c76d00
function addClass() {
var newClass = document.getElementById("classes").value;
var classes = document.getElementById("classesTaken").value;
var newClass = document.getElementById("class").value;
var classes = document.getElementById("classes").value;
classes = classes.concat(newClass);
document.getElementById("classesTaken").value = classes + ",";
document.getElementById("classes").value = classes + ",";
}
function degreeSelectHandler(degree) {
var yearList = document.getElementById('YearList');
var specializationList = document.getElementById('SpecializationOfDegree');
var yearList = document.getElementById('year');
var specializationList = document.getElementById('specialization');
removeOptions(yearList);
removeOptions(specializationList);
......@@ -64,8 +64,8 @@ function goBack() {
}
function fillOutExample() {
document.getElementById("MajorList").value = "math";
document.getElementById("SpecializationOfDegree").value = "applied";
document.getElementById("YearList").value = "2015"
document.getElementById("classesTaken").value = "cs1337,phys2125,phys2126,phys2325,phys2326,chem1311,chem1111,math2417,hist1301,hist1302,math2419,govt2305,govt2306,rhet1302,cs2305,cs2336,cs3305,cs3340,math2418,ahst2331,math3310,cs3345,cs3341,cs4V98,math2451,math3311,math3323,ecs1200,ecs3390"
document.getElementById("major").value = "math";
document.getElementById("specialization").value = "applied";
document.getElementById("year").value = "2015"
document.getElementById("classes").value = "cs1337,phys2125,phys2126,phys2325,phys2326,chem1311,chem1111,math2417,hist1301,hist1302,math2419,govt2305,govt2306,rhet1302,cs2305,cs2336,cs3305,cs3340,math2418,ahst2331,math3310,cs3345,cs3341,cs4V98,math2451,math3311,math3323,ecs1200,ecs3390"
};
......@@ -9,6 +9,7 @@
<link rel="stylesheet" href={{ url_for('static', filename='GAS.css') }}>
<link rel="shortcut icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<link rel="icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<script src={{ url_for('static', filename='GAS.js') }}></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
......@@ -77,14 +78,17 @@
<div class="form-group">
<label for="classes">Type in your class number (ex: cs1336), and hit the "Add Class" button to enter it.</label>
<input list="classes-datalist" type="text" name="classes" id="classes" >
<input list="classes-datalist" type="text" name="class" id="class" >
{{ course_list() }}
<button type="button" onclick="addClass()">Add class</button>
</div>
<div class="form-group">
<label for="showClasses">Classes Taken</label><br>
<textarea name="classesTaken" id="classesTaken" rows="6" cols="60"></textarea>
<label for="classes">Classes Taken</label><br>
<textarea name="classes" id="classes" rows="6" cols="60"></textarea>
<div class="button">
<button type="button" onclick="fillOutExample()">Fill out Example</button>
</div>
<div class="button">
<input type="submit" value="Perform Audit"></input>
</div>
......
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