Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 1
<!DOCTYPE html>
2
<html>
3
<head>
4
	<meta charset="utf-8">
5
	<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
7
 
8
	<title>KeyTable example - Server-side processing</title>
9
	<link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
10
	<link rel="stylesheet" type="text/css" href="../../css/keyTable.datatables.css">
11
	<link rel="stylesheet" type="text/css" href="../../../../examples/resources/syntax/shCore.css">
12
	<link rel="stylesheet" type="text/css" href="../../../../examples/resources/demo.css">
13
	<style type="text/css" class="init">
14
 
15
	</style>
16
	<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
17
	<script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
18
	<script type="text/javascript" language="javascript" src="../../js/dataTables.keyTable.js"></script>
19
	<script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
20
	<script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
21
	<script type="text/javascript" language="javascript" class="init">
22
 
23
 
24
$(document).ready(function() {
25
	$('#example').DataTable( {
26
		serverSide: true,
27
		ajax: "../../../../examples/server_side/scripts/server_processing.php",
28
		keys: true
29
	} );
30
} );
31
 
32
 
33
	</script>
34
</head>
35
 
36
<body class="dt-example">
37
	<div class="container">
38
		<section>
39
			<h1>KeyTable example <span>Server-side processing</span></h1>
40
 
41
			<div class="info">
42
				<p>KeyTable fully supports DataTables <a href="//datatables.net/manual/server-side">server-side processing mode</a> which can be used to display a DataTable that
43
				contains thousands or millions of records.</p>
44
 
45
				<p>The interaction options of KeyTable operate in exactly the same way for server-side processing, as shown in this example (try using the arrow keys to move focus
46
				from one page to another for example).</p>
47
			</div>
48
 
49
			<table id="example" class="display" cellspacing="0" width="100%">
50
				<thead>
51
					<tr>
52
						<th>First name</th>
53
						<th>Last name</th>
54
						<th>Position</th>
55
						<th>Office</th>
56
						<th>Start date</th>
57
						<th>Salary</th>
58
					</tr>
59
				</thead>
60
 
61
				<tfoot>
62
					<tr>
63
						<th>First name</th>
64
						<th>Last name</th>
65
						<th>Position</th>
66
						<th>Office</th>
67
						<th>Start date</th>
68
						<th>Salary</th>
69
					</tr>
70
				</tfoot>
71
			</table>
72
 
73
			<ul class="tabs">
74
				<li class="active">Javascript</li>
75
				<li>HTML</li>
76
				<li>CSS</li>
77
				<li>Ajax</li>
78
				<li>Server-side script</li>
79
			</ul>
80
 
81
			<div class="tabs">
82
				<div class="js">
83
					<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
84
	$('#example').DataTable( {
85
		serverSide: true,
86
		ajax: &quot;../../../../examples/server_side/scripts/server_processing.php&quot;,
87
		keys: true
88
	} );
89
} );</code>
90
 
91
					<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
92
 
93
					<ul>
94
						<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.js</a></li>
95
						<li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
96
						<li><a href="../../js/dataTables.keyTable.js">../../js/dataTables.keyTable.js</a></li>
97
					</ul>
98
				</div>
99
 
100
				<div class="table">
101
					<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
102
				</div>
103
 
104
				<div class="css">
105
					<div>
106
						<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
107
						additional CSS used is shown below:</p><code class="multiline language-css"></code>
108
					</div>
109
 
110
					<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
111
 
112
					<ul>
113
						<li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
114
						<li><a href="../../css/keyTable.datatables.css">../../css/keyTable.datatables.css</a></li>
115
					</ul>
116
				</div>
117
 
118
				<div class="ajax">
119
					<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
120
					loaded.</p>
121
				</div>
122
 
123
				<div class="php">
124
					<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
125
					processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
126
					documentation</a>.</p>
127
				</div>
128
			</div>
129
		</section>
130
	</div>
131
 
132
	<section>
133
		<div class="footer">
134
			<div class="gradient"></div>
135
 
136
			<div class="liner">
137
				<h2>Other examples</h2>
138
 
139
				<div class="toc">
140
					<div class="toc-group">
141
						<h3><a href="./index.html">Initialisation</a></h3>
142
						<ul class="toc active">
143
							<li><a href="./simple.html">Basic initialisation</a></li>
144
							<li><a href="./events.html">Events</a></li>
145
							<li><a href="./scrolling.html">Scrolling table</a></li>
146
							<li class="active"><a href="./server-side.html">Server-side processing</a></li>
147
							<li><a href="./stateSave.html">State saving</a></li>
148
						</ul>
149
					</div>
150
 
151
					<div class="toc-group">
152
						<h3><a href="../styling/index.html">Styling</a></h3>
153
						<ul class="toc">
154
							<li><a href="../styling/focusStyle.html">Focus cell custom styling</a></li>
155
							<li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
156
							<li><a href="../styling/foundation.html">Foundation styling</a></li>
157
							<li><a href="../styling/jqueryui.html">jQuery UI styling</a></li>
158
						</ul>
159
					</div>
160
				</div>
161
 
162
				<div class="epilogue">
163
					<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
164
					Additionally, there are a wide range of <a href="http://www.datatables.net/extensions">extensions</a> and <a href=
165
					"http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.</p>
166
 
167
					<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
168
					DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
169
				</div>
170
			</div>
171
		</div>
172
	</section>
173
</body>
174
</html>