-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (38 loc) · 1.31 KB
/
index.html
File metadata and controls
47 lines (38 loc) · 1.31 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
<html>
<head>
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
</head>
<body>
管理No
<input type="text" id="kanriNo">
<button onclick="openDialog()">開く</button>
<div id="result"></div>
<input type="hidden" id="reloadFlg" value="0">
<script>
function openDialog() {
var kanriNo = $("#kanriNo").val();
openWindow(kanriNo);
}
function openWindow(kanriNo) {
var width = 1000;
var height = 700;
var locationX = (screen.availWidth - width) / 2;
var locationY = (screen.availHeight - height) / 2;
var widthinOpt = "menubar=no,width=" + width + ",height=" + height + ",top=" + locationY + ",left=" + locationX;
var subWindow = window.open('child.html?kanriNo=' + kanriNo, "_blank", widthinOpt);
$(subWindow).on('unload', function () {
setTimeout(function () {
if (!subWindow.closed) return;
closeWindow();
}, 10);
});
}
function closeWindow() {
if ($("#reloadFlg").val() === "1") {
location.reload();
}
}
</script>
</body>
</html>