-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchronologicalFunction.js
More file actions
51 lines (33 loc) · 1.13 KB
/
chronologicalFunction.js
File metadata and controls
51 lines (33 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
///PLACES NUMERICAL VALUE ON AN ACTIVITY BASED ON IT'S CHRONOLOGICAL LENGTH
var intSelectValue = "";
var customIntSelectValue = "";
var selectBoxChoice = "";
var rowValue = 0;
function standardValue() {
if (frequencyInput === "Day") {
intSelectValue = 1; }
else if (frequencyInput === "Week") {
intSelectValue = 7; }
else if (frequencyInput === "Month") {
intSelectValue = 30; }
else if (frequencyInput === "Year") {
intSelectValue = 365; }
else {
intSelectValue = 0; }
}
function getSelectBoxChoice() {
var indexSelect = document.getElementById("customIntSelect").selectedIndex;
var valueSelect = document.getElementById("customIntSelect").options[indexSelect].text;
selectBoxChoice = valueSelect;
}
function customValue() {
if(selectBoxChoice === "Days") {
customIntSelectValue = 1 * numCustomInt.value; }
else if (selectBoxChoice === "Weeks") {
customIntSelectValue = 7 * numCustomInt.value; }
else if (selectBoxChoice === "Months") {
customIntSelectValue = 30 * numCustomInt.value; }
else if (selectBoxChoice === "Years") {
customIntSelectValue = 365 * numCustomInt.value; }
else {customIntSelectValue = 0;}
}