質問編集履歴

1

ソースコードを追記しました

2017/03/12 04:43

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -17,3 +17,241 @@
17
17
  });
18
18
 
19
19
  を試してみましたが、オーバーライドすることはありませんでした。
20
+
21
+
22
+
23
+
24
+
25
+ ###ソースコード
26
+
27
+ 【abcJs.phtml】
28
+
29
+ ```Jquery
30
+
31
+ <script type="text/javascript" language="javascript"><!--
32
+
33
+ $(window).load(function()
34
+
35
+ {
36
+
37
+ <? /* 住所と物件名から基本情報を取得 */ ?>
38
+
39
+ $("#getSearchRent").click(function()
40
+
41
+ {
42
+
43
+ <? /* ダイアログを開く */ ?>
44
+
45
+ objSearchRentDialog = new ModalDialog({
46
+
47
+ dialogId : 'searchRentDialog',
48
+
49
+ height: 480,
50
+
51
+ width: 985,
52
+
53
+ title: '物件を候補から取込みます',
54
+
55
+ });
56
+
57
+
58
+
59
+ searchRentDialog = objSearchRentDialog.open();
60
+
61
+
62
+
63
+ $("#searchRentDialog").html('検索中')
64
+
65
+ .dialog('open')
66
+
67
+ .load(
68
+
69
+ "<?= $searchAjax ?>",
70
+
71
+ {
72
+
73
+ classcode : '<?= $rentClass ?>',
74
+
75
+ name : $("#realEstateName1").val(),
76
+
77
+ spare : $("#spareDetail").val(),
78
+
79
+ code1 : $("#todofukenCode").val(),
80
+
81
+ code2 : $("#shikuchosonCode").val(),
82
+
83
+ code3 : $("#oazaTsushoCode").val(),
84
+
85
+ code4 : $("#azaChomokuCode").val(),
86
+
87
+ <? if($this->kanriFlg): ?>
88
+
89
+ kanriFlg : 1,
90
+
91
+ <? endif; ?>
92
+
93
+ firstTime : 1
94
+
95
+ }
96
+
97
+ );
98
+
99
+ });
100
+
101
+ });
102
+
103
+ // -->
104
+
105
+ </script>
106
+
107
+ ```
108
+
109
+ 【defeJs.phtml】
110
+
111
+ ```
112
+
113
+ <?=$this->render('/search/abcJs.phtml'); ?>
114
+
115
+ <script type="text/javascript" language="javascript"><!--
116
+
117
+
118
+
119
+ $(window).load(function()
120
+
121
+ {
122
+
123
+ //フリガナ自動入力
124
+
125
+ Name = '';
126
+
127
+ NameKana = '';
128
+
129
+ $('input#Name').katakanaAutoComplete($('input#NameKana'), Name, NameKana);
130
+
131
+ });
132
+
133
+ ```
134
+
135
+ ghiJs.phtml
136
+
137
+ ```
138
+
139
+ <script type="text/javascript" language="javascript">
140
+
141
+ $(function(){
142
+
143
+ $("#Time").on('change keyup',function(){
144
+
145
+ var time = $(this).val();
146
+
147
+ if(time === ""){
148
+
149
+ $(this).next('span').next('input[type="text"]').val('');
150
+
151
+ } else {
152
+
153
+ $(this).next('span').next('input[type="text"]').val(time * 50);
154
+
155
+ }
156
+
157
+ });
158
+
159
+ });
160
+
161
+
162
+
163
+ </script>
164
+
165
+ ```
166
+
167
+ HTML
168
+
169
+ ```
170
+
171
+ <div class="ttl_bt_box">
172
+
173
+ <button type="button" id="getSearchRent">検索ダイアログ
174
+
175
+ </button>
176
+
177
+ </div>
178
+
179
+ <table>
180
+
181
+ <tr>
182
+
183
+ <th>
184
+
185
+ 名前
186
+
187
+
188
+
189
+ </th>
190
+
191
+ <td>
192
+
193
+ <?= $this->form->Name ?>
194
+
195
+ <?= $this->error($this->form->Name) ?>
196
+
197
+ </td>
198
+
199
+ </tr>
200
+
201
+ <tr>
202
+
203
+ <th>
204
+
205
+ フリガナ
206
+
207
+ </th>
208
+
209
+ <td>
210
+
211
+ <?= $this->form->NameKana ?>
212
+
213
+ <?= $this->error($this->form->NameKana) ?>
214
+
215
+ </td>
216
+
217
+ </tr>
218
+
219
+ </table>
220
+
221
+
222
+
223
+ <table>
224
+
225
+ <tr>
226
+
227
+ <th>
228
+
229
+ 時間・距離
230
+
231
+ </th>
232
+
233
+ <td>
234
+
235
+ <span id="Time">
236
+
237
+ <?= $this->form->Time ?>分・
238
+
239
+ <?= $this->form->Distance ?>m
240
+
241
+ </span>
242
+
243
+ <?= $this->error($this->form->Time) ?>
244
+
245
+ <?= $this->error($this->form->Distance) ?>
246
+
247
+ </td>
248
+
249
+ </tr>
250
+
251
+ </table>
252
+
253
+ ```
254
+
255
+
256
+
257
+ ※ソースコードを追記しました。