質問編集履歴

7

コードを修正

2018/07/04 05:12

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -272,7 +272,7 @@
272
272
 
273
273
  //hogeの値を取得
274
274
 
275
- $response = $this->Model->getHoge($request['piyo']);
275
+ $response['cmb'] = $this->Model->getHoge($request['piyo']);
276
276
 
277
277
 
278
278
 

6

data内容を追記しました

2018/07/04 05:12

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -240,6 +240,12 @@
240
240
 
241
241
  においてSCRIPT5007: 未定義または NULL 参照のプロパティ 'length' は取得できませんのエラー
242
242
 
243
+
244
+
245
+ console.log(data);結果
246
+
247
+ [object Object]{1: "グロス"}
248
+
243
249
  ```
244
250
 
245
251
 

5

エラーについて追記

2018/07/04 05:01

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -234,6 +234,14 @@
234
234
 
235
235
  ---
236
236
 
237
+ ```javascript
238
+
239
+ 34行目 for (var i = 0; i < cmb.length; i++) {
240
+
241
+ においてSCRIPT5007: 未定義または NULL 参照のプロパティ 'length' は取得できませんのエラー
242
+
243
+ ```
244
+
237
245
 
238
246
 
239
247
  controller

4

記述間違いを修正

2018/07/04 04:57

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -170,7 +170,7 @@
170
170
 
171
171
 
172
172
 
173
- var elmCmb = document.getElementById('cmbNaiyo_Kbn');
173
+ var elmCmb = document.getElementById('hoge');
174
174
 
175
175
  while (0 < elmCmb.childNodes.length) {
176
176
 

3

記述ミスを修正

2018/07/04 04:38

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -108,7 +108,7 @@
108
108
 
109
109
  ```PHP
110
110
 
111
- <input type="hidden" id="URL_Piyo" name="URL_Piyo" value="/changePiyo">
111
+ <input type="hidden" id="URL_Piyo" name="URL_Piyo" value="/changepiyo">
112
112
 
113
113
  ```
114
114
 

2

Modelについての記述を追加

2018/07/04 04:33

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
 
12
12
 
13
+ データはOracleから取得していますがModelは問題なく動きデータの取得を確認しています。
14
+
15
+
16
+
13
17
  ### 発生している問題・エラーメッセージ
14
18
 
15
19
 

1

コンボボックスのソースの追加しました。

2018/07/04 04:32

投稿

ta_ku0419
ta_ku0419

スコア13

test CHANGED
File without changes
test CHANGED
@@ -24,15 +24,93 @@
24
24
 
25
25
  view
26
26
 
27
+ piyoコンボボックス
28
+
29
+ ```PHP
30
+
31
+ <dt class="l-np-form-cell-label-nowidth np-width-10per">
32
+
33
+ <label class="np-is-label-require" for="piyo">piyo</label>
34
+
35
+ </dt>
36
+
37
+ <dd class="l-np-form-cell-item np-width-15per">
38
+
39
+ <?php
40
+
41
+ if (isset($msg['piyo'])) {
42
+
43
+ echo form_dropdown('piyo', $piyoOptions, $piyo, 'class="np-select np-width-80per np-err-input-item" id="piyo" onchange="changepiyo();" tabindex="21"');
44
+
45
+ } else {
46
+
47
+ echo form_dropdown('piyo', $piyoOptions, $piyo, 'class="np-select np-width-80per" id="piyo" onchange="changepiyo();" tabindex="21"');
48
+
49
+ }
50
+
51
+ ?>
52
+
53
+ <?php if (isset($msg['piyo'])): ?>
54
+
55
+ <span class="l-np-form-cell-item np-err-input-icon" style="display:inline;" onclick="showErrToolTip_INS('piyo','<?= $msg['piyo'] ?>')" ></span>
56
+
27
- piyo onchange=changePiyo()
57
+ <?php endif; ?>
58
+
28
-
59
+ </dd>
60
+
29
-
61
+ ```
62
+
63
+ hogeコンボボックス
64
+
65
+ ```PHP
66
+
67
+ <dt class="l-np-form-cell-label-nowidth np-width-10per">
68
+
69
+ <label class="np-is-label-require" for="hoge">hoge</label>
70
+
71
+ </dt>
72
+
73
+ <dd class="l-np-form-cell-item np-width-20per">
74
+
75
+ <?php
76
+
77
+ if (isset($msg['hoge'])) {
78
+
79
+ echo form_dropdown('hoge', $hogeOptions, $hoge, 'class="np-select np-width-80per np-err-input-item" id="hoge" tabindex="20"');
80
+
81
+ } else {
82
+
83
+ echo form_dropdown('hoge', $hogeOptions, $hoge, 'class="np-select np-width-80per" id="hoge" tabindex="20"');
84
+
85
+ }
86
+
87
+ ?>
88
+
89
+ <?php if (isset($msg['hoge'])): ?>
90
+
91
+ <span class="l-np-form-cell-item np-err-input-icon" style="display:inline;" onclick="showErrToolTip_INS('hoge','<?= $msg['hoge'] ?>')" ></span>
92
+
93
+ <?php endif; ?>
94
+
95
+ </dd>
96
+
97
+ <dd class="l-np-form-cell-item">
98
+
99
+ </dd>
100
+
101
+ ```
102
+
103
+ 隠し項目
104
+
105
+ ```PHP
30
106
 
31
107
  <input type="hidden" id="URL_Piyo" name="URL_Piyo" value="/changePiyo">
32
108
 
33
-
109
+ ```
110
+
34
-
111
+ ---
112
+
35
- javascript
113
+ ```javascript
36
114
 
37
115
  public function changepiyo{
38
116
 
@@ -146,10 +224,18 @@
146
224
 
147
225
  ;
148
226
 
227
+ return false;
228
+
229
+ ```
230
+
231
+ ---
232
+
149
233
 
150
234
 
151
235
  controller
152
236
 
237
+ ```PHP
238
+
153
239
  public function changepiyo()
154
240
 
155
241
  {
@@ -178,6 +264,10 @@
178
264
 
179
265
  }
180
266
 
267
+ ```
268
+
269
+
270
+
181
271
 
182
272
 
183
273
  ### 試したこと