質問するログイン新規登録

質問編集履歴

7

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

2018/03/09 11:30

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -76,4 +76,73 @@
76
76
  $strHTML .= "</tbody>
77
77
  </table>";
78
78
  </html> ';
79
+ ```
80
+
81
+ 「追記」
82
+ 修正しましたが、$(document).ready(function() {の箇所で
83
+ syntax error, unexpected '('と怒られます。なぜでしょうか。
84
+ ほかにもおかしな箇所ありましたらご教授ください。
85
+
86
+ ```
87
+ $strHTML = '<!DOCTYPE html>
88
+ <html>
89
+ <head>
90
+ <meta charset="utf-8">
91
+ <meta name="description" content="テスト">
92
+ <title>tbodyScroll - jQueryプラグイン</title>
93
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
94
+ <script src="jquery.tbodyscroll.js"></script>
95
+ <script> ';
96
+
97
+ $(document).ready(function() {
98
+ $(".demo").tbodyScroll({
99
+ thead_height: "30px",
100
+ tbody_height: "100px",
101
+ head_bgcolor: "transparent",
102
+ foot_bgcolor: "transparent"
103
+ });
104
+ });
105
+
106
+ $strHTML = '</script>
107
+ <style>
108
+ th,td {width: 180px;}
109
+ </style>
110
+ </head>';
111
+
112
+ //ヘッダー部
113
+ $strHTML = '<table id="tbl_list" cellspacing="0" cellpadding="0" >
114
+ <thead>
115
+ <tr>
116
+ <th scope="col" class="f-weight" >'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
117
+ <th scope="col" class="f-weight" >メーカー名</th>
118
+ <th scope="col" class="f-weight" >シリアルNo</th>
119
+ </tr>
120
+ </thead>
121
+ ';
122
+ $strHTML .= "<tbody >";
123
+
124
+ if ($datanum > 0) {
125
+
126
+ while ($CN->EOF() == true) {
127
+
128
+ //データ部
129
+ $strHTML .= "<tr ".$bgcolor.">
130
+ <td class='break' >"._hs($CN->GetFieldData('kanri_no'))."</td>
131
+ <td class='break' >"._hs($CN->GetFieldData('maker_name'))."</td>
132
+ <td class='break' >"._hs($CN->GetFieldData('maker_serial'))."</td>
133
+ </tr>";
134
+
135
+ $CN->MoveNext();
136
+
137
+ }
138
+
139
+ } else {
140
+ $strHTML .= "<tr><td colspan='28'>該当するデータがありません。</td></tr>";
141
+ }
142
+
143
+ $CN->DBClose();
144
+
145
+ $strHTML .= "</tbody>
146
+ </table>";
147
+ </html> ';
79
148
  ```

6

誤記修正

2018/03/09 11:30

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -13,7 +13,7 @@
13
13
  以下のようにjQueryプラグインを使用しようとしていますが、おかしな点はありますでしょうか?
14
14
  現状はなぜか、
15
15
  thead_height: '30px',の箇所や、
16
- $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
16
+ $strHTML = '<table id="tbl_list" cellspacing="0" cellpadding="0" >
17
17
  の箇所でsyntax errorが出力されてしまいます。
18
18
 
19
19
  ```
@@ -41,7 +41,7 @@
41
41
  </head>
42
42
 
43
43
  //ヘッダー部
44
- $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
44
+ $strHTML = '<table id="tbl_list" cellspacing="0" cellpadding="0" >
45
45
  <thead>
46
46
  <tr>
47
47
  <th scope="col" class="f-weight" >'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>

5

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

2018/03/07 07:13

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -9,9 +9,12 @@
9
9
  どうやっても上記で作成した表のスクロールがIEでは消えてしまいます。
10
10
  解決方法ありましたら宜しくお願いします。
11
11
 
12
- 「追記」
12
+ 「追記」※styleとborderの個所を削除しております。
13
13
  以下のようにjQueryプラグインを使用しようとしていますが、おかしな点はありますでしょうか?
14
+ 現状はなぜか、
15
+ thead_height: '30px',の箇所や、
16
+ $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
14
- 管理番号部分でsyntax errorなど出ているので、以下のソース外で定義る$lent_ichranなどに問題があるのかと考えています。
17
+ 箇所でsyntax error力されてしいます。
15
18
 
16
19
  ```
17
20
  $strHTML = '<!DOCTYPE html>
@@ -38,12 +41,12 @@
38
41
  </head>
39
42
 
40
43
  //ヘッダー部
41
- $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" style="width:2620px;">
44
+ $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" >
42
45
  <thead>
43
46
  <tr>
44
- <th scope="col" class="f-weight" style="width:80px;text-align:center;">'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
47
+ <th scope="col" class="f-weight" >'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
45
- <th scope="col" class="f-weight" style="width:70px;">メーカー名</th>
48
+ <th scope="col" class="f-weight" >メーカー名</th>
46
- <th scope="col" class="f-weight" style="width:100px;">シリアルNo</th>
49
+ <th scope="col" class="f-weight" >シリアルNo</th>
47
50
  </tr>
48
51
  </thead>
49
52
  ';
@@ -55,9 +58,9 @@
55
58
 
56
59
  //データ部
57
60
  $strHTML .= "<tr ".$bgcolor.">
58
- <td class='break' style='width:80px;'>"._hs($CN->GetFieldData('kanri_no'))."</td>
61
+ <td class='break' >"._hs($CN->GetFieldData('kanri_no'))."</td>
59
- <td class='break' style='width:70px;'>"._hs($CN->GetFieldData('maker_name'))."</td>
62
+ <td class='break' >"._hs($CN->GetFieldData('maker_name'))."</td>
60
- <td class='break' style='width:100px;'>"._hs($CN->GetFieldData('maker_serial'))."</td>
63
+ <td class='break' >"._hs($CN->GetFieldData('maker_serial'))."</td>
61
64
  </tr>";
62
65
 
63
66
  $CN->MoveNext();

4

誤記修正

2018/03/07 07:01

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -41,6 +41,7 @@
41
41
  $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" style="width:2620px;">
42
42
  <thead>
43
43
  <tr>
44
+ <th scope="col" class="f-weight" style="width:80px;text-align:center;">'.((!empty($lent_ichran)) ? "レンタル":'').'管理番号</th>
44
45
  <th scope="col" class="f-weight" style="width:70px;">メーカー名</th>
45
46
  <th scope="col" class="f-weight" style="width:100px;">シリアルNo</th>
46
47
  </tr>
@@ -54,6 +55,7 @@
54
55
 
55
56
  //データ部
56
57
  $strHTML .= "<tr ".$bgcolor.">
58
+ <td class='break' style='width:80px;'>"._hs($CN->GetFieldData('kanri_no'))."</td>
57
59
  <td class='break' style='width:70px;'>"._hs($CN->GetFieldData('maker_name'))."</td>
58
60
  <td class='break' style='width:100px;'>"._hs($CN->GetFieldData('maker_serial'))."</td>
59
61
  </tr>";

3

ソースを記載しました。

2018/03/07 01:51

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -7,4 +7,68 @@
7
7
 
8
8
  いろいろ試してみたのですが、
9
9
  どうやっても上記で作成した表のスクロールがIEでは消えてしまいます。
10
- 解決方法ありましたら宜しくお願いします。
10
+ 解決方法ありましたら宜しくお願いします。
11
+
12
+ 「追記」
13
+ 以下のようにjQueryプラグインを使用しようとしていますが、おかしな点はありますでしょうか?
14
+ 管理番号の部分でsyntax errorなど出ているので、以下のソース外で定義している$lent_ichranなどに問題があるのかと考えています。
15
+
16
+ ```
17
+ $strHTML = '<!DOCTYPE html>
18
+ <html>
19
+ <head>
20
+ <meta charset="utf-8">
21
+ <meta name="description" content="テスト">
22
+ <title>tbodyScroll - jQueryプラグイン</title>
23
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
24
+ <script src="jquery.tbodyscroll.js"></script>
25
+ <script>
26
+ $(document).ready(function() {
27
+ $('.demo').tbodyScroll({
28
+ thead_height: '30px',
29
+ tbody_height: '100px',
30
+ head_bgcolor: 'transparent',
31
+ foot_bgcolor: 'transparent'
32
+ });
33
+ });
34
+ </script>
35
+ <style>
36
+ th,td {width: 180px;}
37
+ </style>
38
+ </head>
39
+
40
+ //ヘッダー部
41
+ $strHTML = '<table id="tbl_list" border="0" cellspacing="0" cellpadding="0" style="width:2620px;">
42
+ <thead>
43
+ <tr>
44
+ <th scope="col" class="f-weight" style="width:70px;">メーカー名</th>
45
+ <th scope="col" class="f-weight" style="width:100px;">シリアルNo</th>
46
+ </tr>
47
+ </thead>
48
+ ';
49
+ $strHTML .= "<tbody >";
50
+
51
+ if ($datanum > 0) {
52
+
53
+ while ($CN->EOF() == true) {
54
+
55
+ //データ部
56
+ $strHTML .= "<tr ".$bgcolor.">
57
+ <td class='break' style='width:70px;'>"._hs($CN->GetFieldData('maker_name'))."</td>
58
+ <td class='break' style='width:100px;'>"._hs($CN->GetFieldData('maker_serial'))."</td>
59
+ </tr>";
60
+
61
+ $CN->MoveNext();
62
+
63
+ }
64
+
65
+ } else {
66
+ $strHTML .= "<tr><td colspan='28'>該当するデータがありません。</td></tr>";
67
+ }
68
+
69
+ $CN->DBClose();
70
+
71
+ $strHTML .= "</tbody>
72
+ </table>";
73
+ </html> ';
74
+ ```

2

誤記修正

2018/03/07 01:49

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,7 @@
1
1
  以下のような表を作成しました。
2
2
  https://jsfiddle.net/h9ehqw55/
3
3
 
4
- 上記の状態では表にスクロールが表示されますが、
4
+ 上記では表にスクロールが表示されますが、
5
5
  IEでhtmlを組むとスクロールが表示されません。
6
6
  Chromeではスクロールが表示されます。
7
7
 

1

誤記を修正

2018/03/06 06:59

投稿

hw_test
hw_test

スコア13

title CHANGED
File without changes
body CHANGED
@@ -2,54 +2,9 @@
2
2
  https://jsfiddle.net/h9ehqw55/
3
3
 
4
4
  上記の状態では表にスクロールが表示されますが、
5
- その表を以下の★の箇所ールすると
5
+ IEhtmlを組むとスクロールが表示されません。
6
- 開いた画面ではスクロールが表示されず、
6
+ Chromeではスクロールが表示されます。
7
- ただ表全体が表示されてしまいます。
8
7
 
9
8
  いろいろ試してみたのですが、
10
- どうやっても上記で作成した表のスクロールが消えてしまいます。
11
- 理由がわかるお教えださい。
12
- 宜しくお願いします。
13
-
14
- ```
15
- <body style="min-width:100%;">
16
- <!--ヘッダーエリア開始-->
17
- <span id="spn_headder">
18
- <?php require_once './common/inc_header.php'; ?>
19
- </span>
20
- <!--ヘッダエリアー終了-->
21
- <div id="page_t"><img src="img/page_t1.gif" width="500" height="26" alt="備品検索・貸出"/></div>
22
-
23
- <!--メインエリア開始-->
24
- <div id="main">
25
- <form id="frm_src">
26
-
27
- <table class="hyou3" name="T1" id="T1">
28
- <tbody>
29
- <tr>
30
- <div style="margin-left:30px; padding:6px;" class="ken">
31
- <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"/>
32
- </div></td>
33
- </tr>
34
- </tbody>
35
- </table>
36
- </form>
37
- <input name="page" type="hidden" id="page" value="1" />
38
- </div>
39
- <hr style="margin:10px 0px" />
40
- <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" />
41
- <div class="hyou2" id="tbldata"></div>★ここでスクロールがある表を呼んでいる
42
- </div>
43
- <br>
44
- <center>
45
- <div name="Pagination" id="Pagination" class="pagination"></div>
46
- </center>
47
- <iframe id="ifm_post" height="0" width="0" src="" ></iframe>
48
- </div>
49
- <!--メインエリア終了-->
50
- <!--フッターエリア開始-->
51
- <?php echo file_get_contents('./common/inc_footer.php'); ?>
52
- <!--フッターエリア終了-->
53
- </body>
54
-
55
- ```
9
+ どうやっても上記で作成した表のスクロールがIEでは消えてしまいます。
10
+ 解決法ありましたら宜しお願します