-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (66 loc) · 2.81 KB
/
index.html
File metadata and controls
70 lines (66 loc) · 2.81 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<script type="module">
import {elements} from './elements.mjs';
import {emission} from './emission.mjs';
import {crystals} from './analyzers.mjs';
import {analyzers} from './analyzers.mjs';
window.elements = elements;
window.emission = emission;
window.analyzers = analyzers;
window.crystals = crystals;
</script>
<script type="module">
var zones = ""
for (var prop in window.elements){
zones += "<option>" + window.elements[prop].symbol + "</option>";
}
var sel = document.myform.selectElement;
sel.innerHTML = zones;
//create checkboxes for crystal analyzers
var zones = ""
for (var prop in window.analyzers){
if(window.analyzers[prop].main==1)
zones += "<input type=\"checkbox\" id=\"" + prop + "\" name=\"analyzerGroup\" checked>"+ prop + "</input>";
if(window.analyzers[prop].main==0)
zones += "<input type=\"checkbox\" id=\"" + prop + "\" name=\"analyzerGroup\">"+ prop + "</input>";
}
var sel = document.myform.crystalFS;
sel.innerHTML = zones;
// var group = document.myform.crystalFS.analyzerGroup;
// for (var chkb in group) {
// chkb.checked = true;
// }
</script>
<script src="./script.js"></script>
</head>
<body>
<h2>vonHamos spectrometer calculator</h2>
<form name="myform" action="insplacement.jsp" style="width:385px">
<fieldset name="emissionFS">
<label for="selectElement" style="display:block;">Chemical element</label>
<select id="selectElement" style="width:250px;display:block;" onchange="fillEmission(this.value)"></select>
<label for="selectEmission" style="display:block;">Emission line</label>
<select id="selectEmission" style="width:250px;display:block;"> </select>
</fieldset>
<fieldset name="crystalFS">
<legend>aaa</legend>>
</fieldset>
<input type = "button" onclick = "calculateBraggAngles();" name = "CalculateBraggAngles" value = "Calculate Bragg Angles">
<br> <br>
<textarea name="resultArea" style="width:380px;height:250px"></textarea>
</form>
</body>
</html>
<!-- <input type = "text" name = "Element" value = "Fe" />>> -->
<!-- <form name="myform">
<select id="selectElement", name="selectElement">
</select>
<select id="selectEmission">
<option>Choose an emission line</option>
</select>
<input type = "button" onclick = "Hello();" name = "ok" value = "Click Me">
</form>
</body>
</html>-->