質問編集履歴
11
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
10
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
9
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
```
|
14
14
|
|
15
|
-
|
15
|
+
window.opener[callback_id] is not a function
|
16
16
|
|
17
17
|
```
|
18
18
|
|
@@ -48,9 +48,33 @@
|
|
48
48
|
|
49
49
|
|
50
50
|
|
51
|
+
|
52
|
+
|
53
|
+
var callback_id = 'callback_modal';
|
54
|
+
|
55
|
+
window[callback_id] = function(ret) {
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
//trueが表示されることを確認
|
60
|
+
|
61
|
+
alert(ret.status);
|
62
|
+
|
63
|
+
return ret ? ret : {"status":false };
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
|
51
71
|
//子画面ウインドウを開く
|
52
72
|
|
53
|
-
var ret = openChild("子画面.html");
|
73
|
+
//var ret = openChild("子画面.html");
|
74
|
+
|
75
|
+
var ret = openChild("子画面.html",window[callback_id]);
|
76
|
+
|
77
|
+
|
54
78
|
|
55
79
|
|
56
80
|
|
@@ -82,47 +106,55 @@
|
|
82
106
|
|
83
107
|
//モーダル画面呼び出し
|
84
108
|
|
109
|
+
//function openChild(url) {
|
110
|
+
|
85
|
-
function openChild(url) {
|
111
|
+
function openChild(url,callback) {
|
86
|
-
|
112
|
+
|
87
|
-
return openDialog(url,900,680);
|
113
|
+
return openDialog(url,900,680,callback);
|
88
|
-
|
114
|
+
|
89
|
-
}
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
|
90
|
-
|
119
|
+
//function openDialog(url,width,height){
|
91
|
-
|
92
|
-
|
120
|
+
|
93
|
-
function openDialog(url,width,height){
|
121
|
+
function openDialog(url,width,height,callback){
|
94
|
-
|
95
|
-
|
96
|
-
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
97
|
-
var callback_id = 'callback_modal';
|
127
|
+
//var callback_id = 'callback_modal';
|
98
|
-
|
128
|
+
|
99
|
-
window[callback_id] = function(ret) {
|
129
|
+
//window[callback_id] = function(ret) {
|
100
130
|
|
101
131
|
|
102
132
|
|
103
|
-
//trueが表示されることを確認
|
133
|
+
////trueが表示されることを確認
|
104
|
-
|
134
|
+
|
105
|
-
alert(ret.status);
|
135
|
+
//alert(ret.status);
|
106
|
-
|
136
|
+
|
107
|
-
return ret ? ret : {"status":false };
|
137
|
+
//return ret ? ret : {"status":false };
|
108
|
-
|
109
|
-
|
110
|
-
|
138
|
+
|
139
|
+
|
140
|
+
|
111
|
-
}
|
141
|
+
//}
|
112
142
|
|
113
143
|
|
114
144
|
|
115
145
|
//小画面呼び出し
|
116
146
|
|
117
|
-
|
147
|
+
var ret window.open(url, callback,
|
118
148
|
|
119
149
|
"dialogWidth:" + width + "px;" +
|
120
150
|
|
121
151
|
"dialogHeight:" + height + "px;" +
|
122
152
|
|
123
|
-
"center:yes; scroll:no;")
|
153
|
+
"center:yes; scroll:no;");
|
154
|
+
|
155
|
+
|
156
|
+
|
124
|
-
|
157
|
+
return ret;
|
125
|
-
|
126
158
|
|
127
159
|
}
|
128
160
|
|
8
test
CHANGED
File without changes
|
test
CHANGED
@@ -23,8 +23,6 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
```親画面.html
|
26
|
-
|
27
|
-
|
28
26
|
|
29
27
|
親画面.html
|
30
28
|
|
@@ -77,8 +75,6 @@
|
|
77
75
|
|
78
76
|
|
79
77
|
```子画面から親画面に値渡し.js
|
80
|
-
|
81
|
-
|
82
78
|
|
83
79
|
小画面から親画面に値渡し.js
|
84
80
|
|
@@ -137,8 +133,6 @@
|
|
137
133
|
|
138
134
|
|
139
135
|
```子画面.html
|
140
|
-
|
141
|
-
|
142
136
|
|
143
137
|
小画面.html
|
144
138
|
|
7
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,8 +26,6 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
|
30
|
-
|
31
29
|
親画面.html
|
32
30
|
|
33
31
|
|
@@ -82,8 +80,6 @@
|
|
82
80
|
|
83
81
|
|
84
82
|
|
85
|
-
|
86
|
-
|
87
83
|
小画面から親画面に値渡し.js
|
88
84
|
|
89
85
|
|
@@ -144,8 +140,6 @@
|
|
144
140
|
|
145
141
|
|
146
142
|
|
147
|
-
|
148
|
-
|
149
143
|
小画面.html
|
150
144
|
|
151
145
|
|
6
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,13 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
```親画面.html
|
25
|
+
```親画面.html
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
親画面.html
|
26
32
|
|
27
33
|
|
28
34
|
|
@@ -76,6 +82,12 @@
|
|
76
82
|
|
77
83
|
|
78
84
|
|
85
|
+
|
86
|
+
|
87
|
+
小画面から親画面に値渡し.js
|
88
|
+
|
89
|
+
|
90
|
+
|
79
91
|
//モーダル画面呼び出し
|
80
92
|
|
81
93
|
function openChild(url) {
|
@@ -132,6 +144,12 @@
|
|
132
144
|
|
133
145
|
|
134
146
|
|
147
|
+
|
148
|
+
|
149
|
+
小画面.html
|
150
|
+
|
151
|
+
|
152
|
+
|
135
153
|
<input type="button" value="確定"
|
136
154
|
|
137
155
|
onClick="ButtonClick()">
|
5
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
function openDialog(url,width,height)
|
89
|
+
function openDialog(url,width,height){
|
90
90
|
|
91
91
|
|
92
92
|
|
@@ -116,7 +116,7 @@
|
|
116
116
|
|
117
117
|
"dialogHeight:" + height + "px;" +
|
118
118
|
|
119
|
-
|
119
|
+
"center:yes; scroll:no;")
|
120
120
|
|
121
121
|
|
122
122
|
|
4
test
CHANGED
File without changes
|
test
CHANGED
@@ -52,7 +52,7 @@
|
|
52
52
|
|
53
53
|
|
54
54
|
|
55
|
-
//
|
55
|
+
//(ここ処理が通るのを確認したい)
|
56
56
|
|
57
57
|
if(ret.status) {
|
58
58
|
|
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
|
78
78
|
|
79
|
-
//
|
79
|
+
//モーダル画面呼び出し
|
80
80
|
|
81
81
|
function openChild(url) {
|
82
82
|
|
@@ -85,8 +85,6 @@
|
|
85
85
|
}
|
86
86
|
|
87
87
|
|
88
|
-
|
89
|
-
//モーダル画面呼び出し
|
90
88
|
|
91
89
|
function openDialog(url,width,height) {
|
92
90
|
|
@@ -102,9 +100,15 @@
|
|
102
100
|
|
103
101
|
alert(ret.status);
|
104
102
|
|
105
|
-
|
103
|
+
return ret ? ret : {"status":false };
|
104
|
+
|
105
|
+
|
106
106
|
|
107
107
|
}
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
//小画面呼び出し
|
108
112
|
|
109
113
|
window.open(url, callback_id,
|
110
114
|
|
@@ -113,6 +117,8 @@
|
|
113
117
|
"dialogHeight:" + height + "px;" +
|
114
118
|
|
115
119
|
"center:yes; scroll:no;")
|
120
|
+
|
121
|
+
|
116
122
|
|
117
123
|
}
|
118
124
|
|
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,11 +100,11 @@
|
|
100
100
|
|
101
101
|
//trueが表示されることを確認
|
102
102
|
|
103
|
-
|
103
|
+
alert(ret.status);
|
104
104
|
|
105
|
-
|
105
|
+
return ret ? ret : {"status":false };
|
106
106
|
|
107
|
-
|
107
|
+
}
|
108
108
|
|
109
109
|
window.open(url, callback_id,
|
110
110
|
|
@@ -162,10 +162,6 @@
|
|
162
162
|
|
163
163
|
|
164
164
|
|
165
|
-
```
|
166
|
-
|
167
|
-
|
168
|
-
|
169
165
|
### 試したこと
|
170
166
|
|
171
167
|
https://qiita.com/hidehito108/items/f7ad9fe23736049a76d6
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,19 +46,19 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
-
|
49
|
+
//子画面ウインドウを開く
|
50
50
|
|
51
|
-
|
51
|
+
var ret = openChild("子画面.html");
|
52
52
|
|
53
53
|
|
54
54
|
|
55
|
-
|
55
|
+
//変数retにステータス値が格納されていることを確認(ここのアラート処理が通るのを確認したい)
|
56
56
|
|
57
|
-
|
57
|
+
if(ret.status) {
|
58
58
|
|
59
|
-
|
59
|
+
alert(ret.status);
|
60
60
|
|
61
|
-
|
61
|
+
}
|
62
62
|
|
63
63
|
}
|
64
64
|
|
@@ -66,13 +66,17 @@
|
|
66
66
|
|
67
67
|
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
```
|
72
70
|
|
73
71
|
|
74
72
|
|
73
|
+
|
74
|
+
|
75
|
+
```子画面から親画面に値渡し.js
|
76
|
+
|
77
|
+
|
78
|
+
|
75
|
-
//
|
79
|
+
//小画面呼び出し
|
76
80
|
|
77
81
|
function openChild(url) {
|
78
82
|
|
@@ -88,35 +92,49 @@
|
|
88
92
|
|
89
93
|
|
90
94
|
|
91
|
-
|
95
|
+
var callback_id = 'callback_modal';
|
92
96
|
|
93
|
-
|
97
|
+
window[callback_id] = function(ret) {
|
94
98
|
|
95
99
|
|
96
100
|
|
97
|
-
|
101
|
+
//trueが表示されることを確認
|
98
102
|
|
99
|
-
|
103
|
+
alert(ret.status);
|
100
104
|
|
101
105
|
return ret ? ret : {"status":false };
|
102
106
|
|
103
107
|
}
|
104
108
|
|
109
|
+
window.open(url, callback_id,
|
110
|
+
|
111
|
+
"dialogWidth:" + width + "px;" +
|
112
|
+
|
105
|
-
|
113
|
+
"dialogHeight:" + height + "px;" +
|
114
|
+
|
115
|
+
"center:yes; scroll:no;")
|
106
116
|
|
107
117
|
}
|
108
118
|
|
109
119
|
|
110
120
|
|
111
|
-
|
121
|
+
```
|
112
122
|
|
113
123
|
|
114
124
|
|
125
|
+
```子画面.html
|
126
|
+
|
127
|
+
|
128
|
+
|
115
|
-
<input type="button" value="確定"
|
129
|
+
<input type="button" value="確定"
|
130
|
+
|
131
|
+
onClick="ButtonClick()">
|
116
132
|
|
117
133
|
<meta charset="UTF-8">
|
118
134
|
|
119
135
|
<script type="text/javascript">
|
136
|
+
|
137
|
+
|
120
138
|
|
121
139
|
//確定ボタン押下時
|
122
140
|
|
@@ -136,7 +154,7 @@
|
|
136
154
|
|
137
155
|
|
138
156
|
|
139
|
-
|
157
|
+
```
|
140
158
|
|
141
159
|
|
142
160
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,9 +22,7 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
```
|
26
|
-
|
27
|
-
親画面.html
|
25
|
+
```親画面.html
|
28
26
|
|
29
27
|
|
30
28
|
|