質問編集履歴

7

修正したソースを追記します

2018/03/09 11:30

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -155,3 +155,141 @@
155
155
  </html> ';
156
156
 
157
157
  ```
158
+
159
+
160
+
161
+ 「追記」
162
+
163
+ 修正しましたが、$(document).ready(function() {の箇所で
164
+
165
+ syntax error, unexpected '('と怒られます。なぜでしょうか。
166
+
167
+ ほかにもおかしな箇所ありましたらご教授ください。
168
+
169
+
170
+
171
+ ```
172
+
173
+ $strHTML = '<!DOCTYPE html>
174
+
175
+ <html>
176
+
177
+ <head>
178
+
179
+ <meta charset="utf-8">
180
+
181
+ <meta name="description" content="テスト">
182
+
183
+ <title>tbodyScroll - jQueryプラグイン</title>
184
+
185
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
186
+
187
+ <script src="jquery.tbodyscroll.js"></script>
188
+
189
+ <script> ';
190
+
191
+
192
+
193
+ $(document).ready(function() {
194
+
195
+ $(".demo").tbodyScroll({
196
+
197
+ thead_height: "30px",
198
+
199
+ tbody_height: "100px",
200
+
201
+ head_bgcolor: "transparent",
202
+
203
+ foot_bgcolor: "transparent"
204
+
205
+ });
206
+
207
+ });
208
+
209
+
210
+
211
+ $strHTML = '</script>
212
+
213
+ <style>
214
+
215
+ th,td {width: 180px;}
216
+
217
+ </style>
218
+
219
+ </head>';
220
+
221
+
222
+
223
+ //ヘッダー部
224
+
225
+ $strHTML = '<table id="tbl_list" cellspacing="0" cellpadding="0" >
226
+
227
+ <thead>
228
+
229
+ <tr>
230
+
231
+ <th scope="col" class="f-weight" >'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
232
+
233
+ <th scope="col" class="f-weight" >メーカー名</th>
234
+
235
+ <th scope="col" class="f-weight" >シリアルNo</th>
236
+
237
+ </tr>
238
+
239
+ </thead>
240
+
241
+ ';
242
+
243
+ $strHTML .= "<tbody >";
244
+
245
+
246
+
247
+ if ($datanum > 0) {
248
+
249
+
250
+
251
+ while ($CN->EOF() == true) {
252
+
253
+
254
+
255
+ //データ部
256
+
257
+ $strHTML .= "<tr ".$bgcolor.">
258
+
259
+ <td class='break' >"._hs($CN->GetFieldData('kanri_no'))."</td>
260
+
261
+ <td class='break' >"._hs($CN->GetFieldData('maker_name'))."</td>
262
+
263
+ <td class='break' >"._hs($CN->GetFieldData('maker_serial'))."</td>
264
+
265
+ </tr>";
266
+
267
+
268
+
269
+ $CN->MoveNext();
270
+
271
+
272
+
273
+ }
274
+
275
+
276
+
277
+ } else {
278
+
279
+ $strHTML .= "<tr><td colspan='28'>該当するデータがありません。</td></tr>";
280
+
281
+ }
282
+
283
+
284
+
285
+ $CN->DBClose();
286
+
287
+
288
+
289
+ $strHTML .= "</tbody>
290
+
291
+ </table>";
292
+
293
+ </html> ';
294
+
295
+ ```

6

誤記修正

2018/03/09 11:30

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  thead_height: '30px',の箇所や、
30
30
 
31
- $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
31
+ $strHTML = '<table id="tbl_list" cellspacing="0" cellpadding="0" >
32
32
 
33
33
  の箇所でsyntax errorが出力されてしまいます。
34
34
 
@@ -84,7 +84,7 @@
84
84
 
85
85
  //ヘッダー部
86
86
 
87
- $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
87
+ $strHTML = '<table id="tbl_list" cellspacing="0" cellpadding="0" >
88
88
 
89
89
  <thead>
90
90
 

5

styleとborderの個所を削除しております。

2018/03/07 07:13

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -20,11 +20,17 @@
20
20
 
21
21
 
22
22
 
23
- 「追記」
23
+ 「追記」※styleとborderの個所を削除しております。
24
24
 
25
25
  以下のようにjQueryプラグインを使用しようとしていますが、おかしな点はありますでしょうか?
26
26
 
27
+ 現状はなぜか、
28
+
29
+ thead_height: '30px',の箇所や、
30
+
31
+ $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
32
+
27
- 管理番号部分でsyntax errorなど出ているので、以下のソース外で定義る$lent_ichranなどに問題があるのかと考えています。
33
+ 箇所でsyntax error力されてしいます。
28
34
 
29
35
 
30
36
 
@@ -78,17 +84,17 @@
78
84
 
79
85
  //ヘッダー部
80
86
 
81
- $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" style="width:2620px;">
87
+ $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
82
88
 
83
89
  <thead>
84
90
 
85
91
  <tr>
86
92
 
87
- <th scope="col" class="f-weight" style="width:80px;text-align:center;">'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
93
+ <th scope="col" class="f-weight" >'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
88
94
 
89
- <th scope="col" class="f-weight" style="width:70px;">メーカー名</th>
95
+ <th scope="col" class="f-weight" >メーカー名</th>
90
96
 
91
- <th scope="col" class="f-weight" style="width:100px;">シリアルNo</th>
97
+ <th scope="col" class="f-weight" >シリアルNo</th>
92
98
 
93
99
  </tr>
94
100
 
@@ -112,11 +118,11 @@
112
118
 
113
119
  $strHTML .= "<tr ".$bgcolor.">
114
120
 
115
- <td class='break' style='width:80px;'>"._hs($CN->GetFieldData('kanri_no'))."</td>
121
+ <td class='break' >"._hs($CN->GetFieldData('kanri_no'))."</td>
116
122
 
117
- <td class='break' style='width:70px;'>"._hs($CN->GetFieldData('maker_name'))."</td>
123
+ <td class='break' >"._hs($CN->GetFieldData('maker_name'))."</td>
118
124
 
119
- <td class='break' style='width:100px;'>"._hs($CN->GetFieldData('maker_serial'))."</td>
125
+ <td class='break' >"._hs($CN->GetFieldData('maker_serial'))."</td>
120
126
 
121
127
  </tr>";
122
128
 

4

誤記修正

2018/03/07 07:01

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -84,6 +84,8 @@
84
84
 
85
85
  <tr>
86
86
 
87
+ <th scope="col" class="f-weight" style="width:80px;text-align:center;">'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
88
+
87
89
  <th scope="col" class="f-weight" style="width:70px;">メーカー名</th>
88
90
 
89
91
  <th scope="col" class="f-weight" style="width:100px;">シリアルNo</th>
@@ -109,6 +111,8 @@
109
111
  //データ部
110
112
 
111
113
  $strHTML .= "<tr ".$bgcolor.">
114
+
115
+ <td class='break' style='width:80px;'>"._hs($CN->GetFieldData('kanri_no'))."</td>
112
116
 
113
117
  <td class='break' style='width:70px;'>"._hs($CN->GetFieldData('maker_name'))."</td>
114
118
 

3

ソースを記載しました。

2018/03/07 01:51

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -17,3 +17,131 @@
17
17
  どうやっても上記で作成した表のスクロールがIEでは消えてしまいます。
18
18
 
19
19
  解決方法ありましたら宜しくお願いします。
20
+
21
+
22
+
23
+ 「追記」
24
+
25
+ 以下のようにjQueryプラグインを使用しようとしていますが、おかしな点はありますでしょうか?
26
+
27
+ 管理番号の部分でsyntax errorなど出ているので、以下のソース外で定義している$lent_ichranなどに問題があるのかと考えています。
28
+
29
+
30
+
31
+ ```
32
+
33
+ $strHTML = '<!DOCTYPE html>
34
+
35
+ <html>
36
+
37
+ <head>
38
+
39
+ <meta charset="utf-8">
40
+
41
+ <meta name="description" content="テスト">
42
+
43
+ <title>tbodyScroll - jQueryプラグイン</title>
44
+
45
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
46
+
47
+ <script src="jquery.tbodyscroll.js"></script>
48
+
49
+ <script>
50
+
51
+ $(document).ready(function() {
52
+
53
+ $('.demo').tbodyScroll({
54
+
55
+ thead_height: '30px',
56
+
57
+ tbody_height: '100px',
58
+
59
+ head_bgcolor: 'transparent',
60
+
61
+ foot_bgcolor: 'transparent'
62
+
63
+ });
64
+
65
+ });
66
+
67
+ </script>
68
+
69
+ <style>
70
+
71
+ th,td {width: 180px;}
72
+
73
+ </style>
74
+
75
+ </head>
76
+
77
+
78
+
79
+ //ヘッダー部
80
+
81
+ $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" style="width:2620px;">
82
+
83
+ <thead>
84
+
85
+ <tr>
86
+
87
+ <th scope="col" class="f-weight" style="width:70px;">メーカー名</th>
88
+
89
+ <th scope="col" class="f-weight" style="width:100px;">シリアルNo</th>
90
+
91
+ </tr>
92
+
93
+ </thead>
94
+
95
+ ';
96
+
97
+ $strHTML .= "<tbody >";
98
+
99
+
100
+
101
+ if ($datanum > 0) {
102
+
103
+
104
+
105
+ while ($CN->EOF() == true) {
106
+
107
+
108
+
109
+ //データ部
110
+
111
+ $strHTML .= "<tr ".$bgcolor.">
112
+
113
+ <td class='break' style='width:70px;'>"._hs($CN->GetFieldData('maker_name'))."</td>
114
+
115
+ <td class='break' style='width:100px;'>"._hs($CN->GetFieldData('maker_serial'))."</td>
116
+
117
+ </tr>";
118
+
119
+
120
+
121
+ $CN->MoveNext();
122
+
123
+
124
+
125
+ }
126
+
127
+
128
+
129
+ } else {
130
+
131
+ $strHTML .= "<tr><td colspan='28'>該当するデータがありません。</td></tr>";
132
+
133
+ }
134
+
135
+
136
+
137
+ $CN->DBClose();
138
+
139
+
140
+
141
+ $strHTML .= "</tbody>
142
+
143
+ </table>";
144
+
145
+ </html> ';
146
+
147
+ ```

2

誤記修正

2018/03/07 01:49

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- 上記の状態では表にスクロールが表示されますが、
7
+ 上記では表にスクロールが表示されますが、
8
8
 
9
9
  IEでhtmlを組むとスクロールが表示されません。
10
10
 

1

誤記を修正

2018/03/06 06:59

投稿

hw_test
hw_test

スコア13

test CHANGED
File without changes
test CHANGED
@@ -6,104 +6,14 @@
6
6
 
7
7
  上記の状態では表にスクロールが表示されますが、
8
8
 
9
- その表以下の★の箇所でコールすると
9
+ IEでhtml組むとスクロールが表示されません。
10
10
 
11
- 開いた画面ではスクロールが表示されず、
11
+ Chromeではスクロールが表示されます。
12
-
13
- ただ表全体が表示されてしまいます。
14
12
 
15
13
 
16
14
 
17
15
  いろいろ試してみたのですが、
18
16
 
19
- どうやっても上記で作成した表のスクロールが消えてしまいます。
17
+ どうやっても上記で作成した表のスクロールがIEでは消えてしまいます。
20
18
 
21
- 理由がわかる方お教えください。
22
-
23
- 宜しくお願いします。
24
-
25
-
26
-
27
- ```
28
-
29
- <body style="min-width:100%;">
30
-
31
- <!--ヘッダーエリア開始-->
32
-
33
- <span id="spn_headder">
34
-
35
- <?php require_once './common/inc_header.php'; ?>
36
-
37
- </span>
38
-
39
- <!--ヘッダエリアー終了-->
40
-
41
- <div id="page_t"><img src="img/page_t1.gif" width="500" height="26" alt="備品検索・貸出"/></div>
42
-
43
-
44
-
45
- <!--メインエリア開始-->
46
-
47
- <div id="main">
48
-
49
- <form id="frm_src">
50
-
51
-
52
-
53
- <table class="hyou3" name="T1" id="T1">
54
-
55
- <tbody>
56
-
57
- <tr>
58
-
59
- <div style="margin-left:30px; padding:6px;" class="ken">
60
-
61
- <input type="radio" name="rdosrc_type" id="rdosrc_type" value="AND" <?php echo (!empty($_SESSION["ichiran"]["rdosrc_type"]) AND $_SESSION["ichiran"]["rdosrc_type"] == "AND") ? 'checked' : ''; ?> >AND <input type="radio" name="rdosrc_type" id="rdosrc_type" value="OR" <?php echo (!empty($_SESSION["ichiran"]["rdosrc_type"]) AND $_SESSION["ichiran"]["rdosrc_type"] == "OR") ? 'checked' : ''; ?>>OR <input name="kensaku" type="button" id="kensaku" value="検索" class="mlr6" /><input name="reset" type="button" id="reset" value="リセット" class="mlr6"/>
62
-
63
- </div></td>
64
-
65
- </tr>
66
-
67
- </tbody>
68
-
69
- </table>
70
-
71
- </form>
72
-
73
- <input name="page" type="hidden" id="page" value="1" />
74
-
75
- </div>
76
-
77
- <hr style="margin:10px 0px" />
78
-
79
- <input name="ins_cart" type="button" id="ins_cart" value="カートへ入れる" class="mlr6" /><input name="out_excel" type="button" id="out_excel" value="EXCEL出力" class="mlr6" />
80
-
81
- <div class="hyou2" id="tbldata"></div>★ここでスクロールがある表を呼んでいる
82
-
83
- </div>
84
-
85
- <br>
86
-
87
- <center>
88
-
89
- <div name="Pagination" id="Pagination" class="pagination"></div>
90
-
91
- </center>
92
-
93
- <iframe id="ifm_post" height="0" width="0" src="" ></iframe>
94
-
95
- </div>
96
-
97
- <!--メインエリア終了-->
98
-
99
- <!--フッターエリア開始-->
100
-
101
- <?php echo file_get_contents('./common/inc_footer.php'); ?>
102
-
103
- <!--フッターエリア終了-->
104
-
105
- </body>
106
-
107
-
108
-
109
- ```
19
+ 解決法ありましたら宜しくします