-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
66 lines (65 loc) · 1.92 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
<link href="css/jquery.ui.css" type="text/css" rel="stylesheet" />
<link href="css/app.css" type="text/css" rel="stylesheet" />
<link href="css/highlight.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="timeoutDialog" style="display:none;">
<p>Your session will timeout shortly.</p>
<p>
You will time out in <span id="countdownTargetSpan" style="font-weight:bold"> seconds.</span>
</p>
</div>
<script language="javascript" type="text/javascript">
$(function() {
$("#timeoutDialog").timeoutdialog({
idleTimeout: 5,
idleAlert: 1,
keepAliveURL: "ajax.html",
validResponseText: 'OK',
countdownTarget: 'countdownTargetSpan',
buttonContinueText: 'Ok',
buttonSignoffText: 'Sign Off',
onTimeout: function() {
window.location = "timeout.html";
},
onSignoff: function(){
window.location = "signoff.html";
}
});
});
</script>
<br />
<center><h1>jQuery Timeout Widget</h1><center>
<table width="95%">
<tr><td width="60%">
<pre class="brush: js;toolbar:false">
$(function() {
$("#timeoutDialog").timeoutdialog({
idleTimeout: 5,
idleAlert: 1,
keepAliveURL: "ajax.html",
validResponseText: 'OK',
countdownTarget: 'countdownTargetSpan',
buttonContinueText: 'Ok',
buttonSignoffText: 'Sign Off',
onTimeout: function() {
window.location = "timeout.html";
},
onSignoff: function(){
window.location = "signoff.html";
}
});
});
</pre>
</td><td width="40%" align="center">
A dialog will popup in 1 minute and you will be timed out in 5 minutes
</td></tr>
</table>
<script src="js/highlight.js" type="text/javascript" ></script>
<script src="js/ui.timeoutdialog.js" type="text/javascript" ></script>
</body>
</html>