forked from vivit-jc/cauldron
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcauldron.js
More file actions
30 lines (26 loc) · 722 Bytes
/
cauldron.js
File metadata and controls
30 lines (26 loc) · 722 Bytes
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
window.onload = function() {
mat1 = document.getElementById('mat1');
mat1.onfocus = function() {
setMaterialToMenu(0);
};
mat2 = document.getElementById('mat2');
mat2.onfocus = function() {
setMaterialToMenu(1);
};
};
function setMaterialToMenu(menuno) {
selectmat = new Array();
selectmat[0] = document.actbox.mat1;
selectmat[1] = document.actbox.mat2;
for(i=0;i<5;i++){
if(selectmat[menuno].options[i].value == selectmat[1-menuno].value){
if(matnum[selectmat[1-menuno]] <= 1){
selectmat[menuno].options[i].disabled = true;
} else {
selectmat[menuno].options[i].disabled = false;
}
} else {
selectmat[menuno].options[i].disabled = false;
}
}
}