-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
64 lines (64 loc) · 2.47 KB
/
index.html
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
<!doctype html>
<html>
<body>
<h1>Tubesheet Generator</h1>
<h2>Calculation Inputs</h2>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).on("change", ":input", function () {
if ($("#tubeOD_input").val()) {
$("#pitchRatio_value").val(
1 + $("#pitch_input").val() / $("#tubeOD_input").val()
);
}
});
</script>
<script>
$(document).on("change", ":input", function () {
if ($("#pitchRatio_value").val()) {
$("#pitchRatio_display").val(
$("#pitchRatio_input").val()
);
}
});
</script>
<table>
<form>
<tr>
<td>
<label for="minTubes_input">Minimum number of tubes required:</label>
</td>
<td>
<input
class="form-value"
type="number"
step="1"
pattern="\d+"
onchange="this.value = parseInt(this.value);"
id="minTubes_input"
/>
</td>
</tr>
<tr>
<td>
<label for="OTLtoShell_input">OTL to shell diametrical clearance:</label>
</td>
<td><input class="form-value" type="number" id="OTLtoShell_input" /></td>
</tr>
<tr>
<td><label for="tubeOD_input">Tube OD:</label></td>
<td><input class="form-value" type="number" id="tubeOD_input" /></td>
</tr>
<tr>
<td><label for="pitch_input">Tube pitch:</label></td>
<td><input class="form-value" type="number" id="pitch_input" /></td>
</tr>
<tr>
<td><label for="pitchRatio_input">Pich ratio:</label></td>
<td><input class="form-value" type="hidden" id="pitchRatio_value" /><input class="form-display" type="number" id="pitchRatio_display" /></td>
</tr>
</form>
</table>
<div id="log"></div>
</body>
</html>