vorigevolgende-oplossing-javascript
Gesponsorde koppelingen
PHP script bestanden
Code (php)
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
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
<html>
<head>
</head>
<script>
function addHistoryPage(pagina)
{
var opt = document.createElement("option");
opt.text = pagina ;
document.getElementById("pages").options.add(opt);
document.getElementById("pages").selectedIndex = document.getElementById("pages").length - 1 ;
document.getElementById("volgende").disabled = true ;
}
function Vorige(knop)
{
document.getElementById("pages").selectedIndex = document.getElementById("pages").selectedIndex - 1;
if (document.getElementById("pages").selectedIndex == 0)
{
document.getElementById("vorige").disabled = true
}
if (document.getElementById("pages").selectedIndex != document.getElementById("pages").length -1)
{
document.getElementById("volgende").disabled = false
}
requestPage(document.getElementById("pages").value,true);
}
function Volgende(knop)
{
document.getElementById("pages").selectedIndex = document.getElementById("pages").selectedIndex + 1;
if (document.getElementById("pages").selectedIndex == document.getElementById("pages").length -1)
{
document.getElementById("volgende").disabled = true
}
if (document.getElementById("pages").selectedIndex != 0)
{
document.getElementById("vorige").disabled = false
}
requestPage(document.getElementById("pages").value,true);
}
function requestPage(pagina,history)
{
if (history != true)
{
addHistoryPage(pagina)
}
//Hier zet je vanzelfsprekend je eigen pagina request in.
document.getElementById("test").innerHTML = pagina ;
}
</script>
<body>
<table>
<tr>
<td colspan="2"><input type="button" onclick="addHistoryPage('pagina.php')" value="set pagina in lijst"></td>
</tr>
<tr>
<td colspan="2">
<select multiple id="pages" disabled>
</select>
</td>
</tr>
<tr>
<td>
<input type="button" value="Vorige" onClick="Vorige()" id="vorige">
</td>
<td>
<input id="volgende" type="button" value="Volgende" onClick="Volgende()">
</td>
</tr>
</table>
<div id="test"></div>
</body>
</html>
<head>
</head>
<script>
function addHistoryPage(pagina)
{
var opt = document.createElement("option");
opt.text = pagina ;
document.getElementById("pages").options.add(opt);
document.getElementById("pages").selectedIndex = document.getElementById("pages").length - 1 ;
document.getElementById("volgende").disabled = true ;
}
function Vorige(knop)
{
document.getElementById("pages").selectedIndex = document.getElementById("pages").selectedIndex - 1;
if (document.getElementById("pages").selectedIndex == 0)
{
document.getElementById("vorige").disabled = true
}
if (document.getElementById("pages").selectedIndex != document.getElementById("pages").length -1)
{
document.getElementById("volgende").disabled = false
}
requestPage(document.getElementById("pages").value,true);
}
function Volgende(knop)
{
document.getElementById("pages").selectedIndex = document.getElementById("pages").selectedIndex + 1;
if (document.getElementById("pages").selectedIndex == document.getElementById("pages").length -1)
{
document.getElementById("volgende").disabled = true
}
if (document.getElementById("pages").selectedIndex != 0)
{
document.getElementById("vorige").disabled = false
}
requestPage(document.getElementById("pages").value,true);
}
function requestPage(pagina,history)
{
if (history != true)
{
addHistoryPage(pagina)
}
//Hier zet je vanzelfsprekend je eigen pagina request in.
document.getElementById("test").innerHTML = pagina ;
}
</script>
<body>
<table>
<tr>
<td colspan="2"><input type="button" onclick="addHistoryPage('pagina.php')" value="set pagina in lijst"></td>
</tr>
<tr>
<td colspan="2">
<select multiple id="pages" disabled>
</select>
</td>
</tr>
<tr>
<td>
<input type="button" value="Vorige" onClick="Vorige()" id="vorige">
</td>
<td>
<input id="volgende" type="button" value="Volgende" onClick="Volgende()">
</td>
</tr>
</table>
<div id="test"></div>
</body>
</html>