-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
276 lines (253 loc) · 11.8 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>WizardTab JQuery Tab plugin with validation</title>
<link rel="stylesheet" href="css/style.css" media="all" type="text/css">
<link href="datepicker/css/DatePicker.css" media="screen" rel="stylesheet" type="text/css"/>
<!--[if lt IE 8]><link href="datepicker/css/DatePicker-ie.css" media="screen" rel="stylesheet" type="text/css"/><![endif]-->
<link rel="stylesheet" href="css/style.css" media="all" type="text/css">
<script type="text/javascript" src="scripts/jquery-1.4.2.min.js">
</script>
<script src="datepicker/js/DatePicker.js" type="text/javascript">
</script>
<script src="datepicker/js/jquery.datepick-nl.js" type="text/javascript">
</script>
<script type="text/javascript" src="scripts/wizardtab.js">
</script>
<script type="text/javascript">
jQuery(document).ready(function(){
var tabs = $("#tabs").wizardtab();
var tabs2 = $("#tabs_2").wizardtab({
isWizard: true,
showTab: 1,
tabsVisible:5,
disableInvalidNextButton:true,
hideInvalidNextButton:true,
disableInvalidPreviousButton:true,
hideInvalidPreviousButton:true,
disableInvalidFinishButton:true,
hideInvalidFinishButton:true,
onFinish: myFinishFunction2,
onTabChange: onTabChangeFn2,
onTabFirst: onTabFirstFn2,
onTabLast: onTabLastFn2,
buttonNextId:"btnWizardTabNext2",
buttonPreviousId:"btnWizardTabPrevious2",
buttonFinishId:"btnWizardTabFinish2",
buttonNextCaption:"Next>>",
buttonPreviousCaption:"<<Previews",
buttonFinishCaption:"<<Finish>>",
classTabHeads:"tabHeads",
buttonLeftScrollClass : "buttonLeftScroll",
buttonRightScrollClass : "buttonRightScroll",
scrollTabsBy:1,
hideInvalidLeftScrollButton:true,
disableInvalidLeftScrollButton:false,
hideInvalidRightScrollButton:true,
disableInvalidRightScrollButton:false,
allowPreviousWhenPassed:true,
classRevalidate: "revalidate"
});
// this is the function for tab change event.
// notice the objWizardTab is populated with this keyword which comes from
// the wizardtab creation. This way we keep a reference to the wizardtab object in order to
// access internal props. from it ( like IsFirst and IsLast)
function onTabChangeFn2(tabId){
$("#log").prepend("<hr><br> onTabChanged called. Tab is now: " + tabId);
$("#log").prepend("<hr><br> check if is in wizard mode: " + tabs2.IsWizard());
}
function onTabFirstFn2(tabId){
$("#log").prepend("<br> onTabFirst called. Tab is now: " + tabId);
}
function onTabLastFn2(tabId){
$("#log").prepend("<br> onTabLast called. Tab is now: " + tabId);
tabs2.IsWizard(false);
$("#log").prepend("<br> IsWizard succesfully called.");
}
function myFinishFunction2(){
$("#log").prepend("<br> onFinish called");
$("#log").prepend("<br> Put the wizardTab in nonWizard mode.");
tabs2.IsWizard(false);
}
// function definition to test if is first tab
function isFirstTab2(objWizardTab){
if (objWizardTab.IsFirst()) {
$("#log").prepend("<br> This is The first tab");
}
else {
$("#log").prepend("<br> This is not the first tab");
}
}
// call to test if is the first tab
isFirstTab2(tabs2);
// function definition to test if is last tab
function isLastTab2(objWizardTab){
if (objWizardTab.IsLast()) {
$("#log").prepend("<br> This is the Last tab");
}
else {
$("#log").prepend("<br> This is not the last tab");
}
}
// call to test is is the last tab
isLastTab2(tabs2);
});
</script>
</head>
<body>
<div id="tabs" class='WizardTabs'>
<ul class="tabHeads">
<li class='tabHead'><a href="#tabs-1">tab 1 bico</a></li>
<li class='tabHead'><a href="#tabs-2">tab 2 abc</a></li>
<li class='tabHead'><a href="#tabs-3">tab 3</a></li>
<li class='tabHead'><a href="#tabs-4">tab 4 lulu</a></li>
<li class='tabHead'><a href="#tabs-5">tab 5 crt</a></li>
<li class='tabHead'><a href="#tabs-6">tab 6 zeta</a></li>
<li class='tabHead'><a href="#tabs-7">tab 7 ril</a></li>
<li class='tabHead'><a href="#tabs-8">tab 8 tabgo</a></li>
<li class='tabHead'><a href="#tabs-9">tab 9 pula</a></li>
<li class='tabHead'><a href="#tabs-10">tab 10</a></li>
<li class='tabHead'><a href="#tabs-11">tab 11 haumti</a></li>
<li class='tabHead'><a href="#tabs-12">tab 12 trok</a></li>
<li class='tabHead'><a href="#tabs-13">tab 13</a></li>
<li class='tabHead'><a href="#tabs-14">tab 14 haamti</a></li>
<li class='tabHead'><a href="#tabs-15">tab 15 trok</a></li>
<li class='tabHead'><a href="#tabs-16">tab 16</a></li>
<li class='tabHead'><a href="#tabs-17">tab 17 haemti</a></li>
<li class='tabHead'><a href="#tabs-18">tab 18 trok</a></li>
<li class='tabHead'><a href="#tabs-19">tab 19</a></li>
</ul>
<button class="buttonLeftScroll"><<</button>
<button class="buttonRightScroll">>></button>
<div id="tabs-1" class="WizardTabsBody">
<p>
<span style="font-size:100px;">1</span>
</p>
This is for revalidation
<input id="DatePicker1" name="DatePicker1" type="text" size="12" value="01/05/2010" class="datepicker revalidate" />
</div>
<div id="tabs-2" class="WizardTabsBody">
<p><span style="font-size:100px;">2</span>
</p>
</div>
<div id="tabs-3" class="WizardTabBody">
<span style="font-size:100px;">3</span>
This will not revalidate
<input id="DatePicker2" name="DatePicker2" type="text" size="12" value="03/05/2010" class="datepicker" />
</div>
<div id="tabs-4" class="WizardTabsBody">
<p><span style="font-size:100px;">4</span>
<input type="text" id="myText" value="enter text here to validate" class="revalidate" />
</p>
</div>
<div id="tabs-5" class="WizardTabsBody">
<p><span style="font-size:100px;">5</span>
</p>
</div>
<div id="tabs-6" class="WizardTabsBody">
<p><span style="font-size:100px;">6</span>
</p>
</div>
<div id="tabs-7" class="WizardTabsBody">
<p><span style="font-size:100px;">7</span>
</p>
</div>
<div id="tabs-8" class="WizardTabsBody">
<p><span style="font-size:100px;">8</span>
</p>
</div>
<div id="tabs-9" class="WizardTabsBody">
<p><span style="font-size:100px;">9</span>
</p>
</div>
<div id="tabs-10" class="WizardTabsBody">
<p><span style="font-size:100px;">10</span>
</p>
</div>
<div id="tabs-11" class="WizardTabsBody">
<p><span style="font-size:100px;">11</span>
</p>
</div>
<div id="tabs-12" class="WizardTabsBody">
<p><span style="font-size:100px;">12</span>
</p>
</div>
<div id="tabs-13" class="WizardTabsBody">
<p><span style="font-size:100px;">13</span>
</p>
</div>
<div id="tabs-14" class="WizardTabsBody">
<p><span style="font-size:100px;">14</span>
</p>
</div>
<div id="tabs-15" class="WizardTabsBody">
<p><span style="font-size:100px;">15</span>
</p>
</div>
<div id="tabs-16" class="WizardTabsBody">
<p><span style="font-size:100px;">16</span>
</p>
</div>
<div id="tabs-17" class="WizardTabsBody">
<p><span style="font-size:100px;">17</span>
</p>
</div>
<div id="tabs-18" class="WizardTabsBody">
<p><span style="font-size:100px;">18</span>
</p>
</div>
<div id="tabs-19" class="WizardTabsBody">
<p><span style="font-size:100px;">19</span>
</p>
</div>
<input type="button" name="btnWizardTabPrevious" id="buttonPreviousStep" value="prev" />
<input type="button" name="btnWizardTabNext" id="buttonNextStep" value="next" />
<input type="button" name="btnWizardTabFinish" id="buttonFinishStep" value="finish" />
</div>
<br />
<br />
<div id="tabs_2" class='WizardTabs'>
<ul class="tabHeads">
<li class='tabHead'><a href="#tabs2-1">tab 1 bico</a></li>
<li class='tabHead'><a href="#tabs2-2">tab 2 abc</a></li>
<li class='tabHead'><a href="#tabs2-3">tab 3</a></li>
<li class='tabHead'><a href="#tabs2-4">tab 4 lulu</a></li>
<li class='tabHead'><a href="#tabs2-5">tab 5 crt</a></li>
</ul>
<button class="buttonLeftScroll"><<</button>
<button class="buttonRightScroll">>></button>
<div id="tabs2-1" class="WizardTabsBody">
<p>
<span style="font-size:100px;">1</span>
<input type="text" id="myText_1" value="enter text here to validate" class="revalidate" />
</p>
</div>
<div id="tabs2-2" class="WizardTabsBody">
<p><span style="font-size:100px;">2</span>
<input type="text" id="myText_2" value="enter text here to validate" class="revalidate" />
</p>
</div>
<div id="tabs2-3" class="WizardTabBody">
<p><span style="font-size:100px;">3</span>
<input type="text" id="myText_3" value="enter text here to validate" class="revalidate" />
</p>
</div>
<div id="tabs2-4" class="WizardTabsBody">
<p><span style="font-size:100px;">4</span>
<input type="text" id="myText_4" value="enter text here to validate" class="revalidate" />
</p>
</div>
<div id="tabs2-5" class="WizardTabsBody">
<p><span style="font-size:100px;">5</span>
</p>
</div>
<input type="button" name="btnWizardTabPrevious" id="btnWizardTabPrevious2" value="prev" />
<input type="button" name="btnWizardTabNext" id="btnWizardTabNext2" value="next" />
<input type="button" name="btnWizardTabFinish" id="btnWizardTabFinish2" value="finish" />
</div>
<div id="log" class='log'>
</div>
</body>
</html>