質問編集履歴

6

タイトルを見直しました。

2017/02/23 07:34

投稿

hydra
hydra

スコア25

test CHANGED
@@ -1 +1 @@
1
- Internet Explorer にて表示できなかった iframe の location オブジェクトの扱いはどうわっ
1
+ 互換性表示をやめたInternet Explorer にて表示できなかった iframe の location 更できなくなりました。
test CHANGED
File without changes

5

文章を補完しました。

2017/02/23 07:33

投稿

hydra
hydra

スコア25

test CHANGED
File without changes
test CHANGED
@@ -108,15 +108,15 @@
108
108
 
109
109
 
110
110
 
111
- IE11モードでは parent.cntname.location.href が無効になったので
111
+ IE11モードではフレームが表示できなくなった後に parent.cntname.location.href が無効になったので
112
112
 
113
113
  試行錯誤して parent.cntname.document.location.href で動作することを確認しました。
114
114
 
115
115
 
116
116
 
117
- また、逆に 互換性表示モードでは
117
+ また、逆に 互換性表示モードではフレームが表示できなくなった後に
118
118
 
119
- parent.cntname.document.location.href が無効になりま
119
+ parent.cntname.document.location.href が無効になりました
120
120
 
121
121
 
122
122
 

4

"バージョンごとの Internet Explorer の互換性の変更点" へのリンクを追加しました。

2017/02/21 06:32

投稿

hydra
hydra

スコア25

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,9 @@
12
12
 
13
13
  parent.フレーム名.location.href と parent.フレーム名.document.location.href の違いは何でしょうか。
14
14
 
15
+
16
+
15
- IEの変更に関するドキュメントを読んでみましたが該当する内容を判別できませんでした。
17
+ [バージョンごとの Internet Explorer 互換性の変更点](https://msdn.microsoft.com/ja-jp/library/dn467846%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)を読んでみましたが該当する内容を判別できませんでした。
16
18
 
17
19
 
18
20
 

3

説明を補完しました。タグを使用して見やすくしました。

2017/02/17 10:00

投稿

hydra
hydra

スコア25

test CHANGED
File without changes
test CHANGED
@@ -5,6 +5,10 @@
5
5
  iframeでメニュー部分とコンテンツ部分に分け、メニューの操作でコンテンツを切り替えて表示しています。
6
6
 
7
7
 
8
+
9
+ フレームが表示できなかった場合に parent.フレーム名.location.href が変更できなくなりました。
10
+
11
+ parent.フレーム名.document.location.href で変更できることがわかったのですが
8
12
 
9
13
  parent.フレーム名.location.href と parent.フレーム名.document.location.href の違いは何でしょうか。
10
14
 
@@ -28,9 +32,9 @@
28
32
 
29
33
 
30
34
 
31
- ###該当のソースコード
35
+ 【index.html】
32
36
 
33
- 【index.html】
37
+ ```ここに言語を入力
34
38
 
35
39
  <!DOCTYPE HTML>
36
40
 
@@ -54,7 +58,13 @@
54
58
 
55
59
  </HTML>
56
60
 
61
+ ```
62
+
63
+
64
+
57
65
  【menu.html】
66
+
67
+ ```ここに言語を入力
58
68
 
59
69
  <!DOCTYPE HTML>
60
70
 
@@ -88,6 +98,8 @@
88
98
 
89
99
  </HTML>
90
100
 
101
+ ```
102
+
91
103
 
92
104
 
93
105
  ###試したこと

2

言葉足らずの箇所や表記ミスを訂正しました。

2017/02/17 09:26

投稿

hydra
hydra

スコア25

test CHANGED
File without changes
test CHANGED
@@ -16,9 +16,9 @@
16
16
 
17
17
 
18
18
 
19
- フレームを通信できないサーバの内容切り替えて表示できなくなった後、
19
+ コンテンツ部分のフレームを通信できないサーバの内容切り替えて表示できなくなった後、
20
20
 
21
- parent.フレーム名.location.href オブジェクトが無効になってしまいま
21
+ parent.フレーム名.location.href オブジェクトが無効になってしまい切り替えることができなくなりした
22
22
 
23
23
 
24
24
 

1

具体的なソースファイルに更新しました。

2017/02/17 00:39

投稿

hydra
hydra

スコア25

test CHANGED
File without changes
test CHANGED
@@ -1,16 +1,12 @@
1
1
  ###前提・実現したいこと
2
2
 
3
- Internet Explorer 11 互換性表示モードで動作していたプログラムをedgeモードで使える機能を使う必要があって変更しています。
3
+ Internet Explorer 11 互換性表示モードで動作していたプログラムをIE11モードで使える機能を使う必要があって変更しています。
4
4
 
5
5
  iframeでメニュー部分とコンテンツ部分に分け、メニューの操作でコンテンツを切り替えて表示しています。
6
6
 
7
7
 
8
8
 
9
- フレーム内が表示できなくなった後に parent.フレーム名.location.href オブジェクトが無効になるため、
10
-
11
- parent.フレーム名.document.location.href を使用しましたが違いは何でしょうか。
9
+ parent.フレーム名.location.href と parent.フレーム名.document.location.href 違いは何でしょうか。
12
-
13
-
14
10
 
15
11
  IEの変更に関するドキュメントを読んでみましたが該当する内容を判別できませんでした。
16
12
 
@@ -20,27 +16,77 @@
20
16
 
21
17
 
22
18
 
23
- コンテンツ切り替えた際に表示できないとき(サーバと通信できなど)に
19
+ フレーム通信できないサーバの内容切り替えて表示できなった後、
24
20
 
21
+ parent.フレーム名.location.href オブジェクトが無効になってしまいます。
22
+
23
+
24
+
25
- コンテンツ部のフレームが白くなりまが、その後は表示可能なコンテンツに切り替えることきなくなりました。
25
+ parent.フレーム名.document.location.href を使用することで動作しました。
26
+
27
+ 違いは何でしょうか。
26
28
 
27
29
 
28
30
 
29
31
  ###該当のソースコード
30
32
 
31
- HTML部
33
+ 【index.html】
32
34
 
33
- <IFRAME name="menu" id="menuid" src="menu.htm"></IFRAME>
35
+ <!DOCTYPE HTML>
34
36
 
37
+ <HTML lang="ja">
38
+
39
+ <HEAD>
40
+
41
+ <META http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
42
+
43
+ <META http-equiv="Content-Type" content="text/html; charset=Windows-31J">
44
+
45
+ </HEAD>
46
+
47
+ <BODY>
48
+
49
+ <IFRAME name="menu" id="menuid" src="./menu.html"></IFRAME>
50
+
35
- <IFRAME name="cntname" id="contentid" src="hoge.htm"></IFRAME>
51
+ <IFRAME name="cntname" id="contentid" src="./test1.html"></IFRAME>
52
+
53
+ </BODY>
54
+
55
+ </HTML>
56
+
57
+ 【menu.html】
58
+
59
+ <!DOCTYPE HTML>
60
+
61
+ <HTML lang="ja">
62
+
63
+ <HEAD>
64
+
65
+ <META http-equiv="Content-Type" content="text/html; charset=Windows-31J">
66
+
67
+ </HEAD>
68
+
69
+ <BODY>
70
+
71
+ <button type="button" name="button1" onClick="parent.cntname.location.href = './test1.html';">
72
+
73
+ <font size="1">button1</font>
74
+
75
+ </button>
36
76
 
37
77
 
38
78
 
39
- 既存のJavascript(互換性表示モード)
79
+ <button type="button" name="button2" onClick="parent.cntname.location.href = 'http://downserver/hoge.html';">
40
80
 
41
- parent.cntname.location.href = hoge2.html
81
+ <font size="1">button2</font>
82
+
83
+ </button>
42
84
 
43
85
 
86
+
87
+ </BODY>
88
+
89
+ </HTML>
44
90
 
45
91
 
46
92
 
@@ -48,15 +94,9 @@
48
94
 
49
95
 
50
96
 
51
- edgeモードでフレームが白くなると parent.cntname.location.href が無効になっていたので
97
+ IE11モードで parent.cntname.location.href が無効になったので
52
98
 
53
- 試行錯誤して以下のコードで動作することを確認しました。
54
-
55
-
56
-
57
- 改造後のJavascript(edgeモード)
58
-
59
- parent.cntname.document.location.href = hoge2.html
99
+ 試行錯誤して parent.cntname.document.location.href で動作することを確認しました。
60
100
 
61
101
 
62
102