Na bepaalde td een tr
Ik heb een vraagje ik moet een max td's per row hebben en dan een tr krijgen.
Dit is mijn script:
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
79
80
81
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
<html>
<title>Midway Bell ringer rewards - Psmore Test fase</title>
<head>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 30%;
width: 400px;
height: 50%;
padding: 16px;
border: 0px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content a:link {color:black;
</style>
<script type="text/javascript">
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","rw_midway_bellringer.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
x=xmlDoc.getElementsByTagName("CD");
function close()
{
document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';
}
function displayCDInfo(i)
{
title=(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue);
htg=(x[i].getElementsByTagName("HTG")[0].childNodes[0].nodeValue);
img=(x[i].getElementsByTagName("IMG")[0].childNodes[0].nodeValue);
descr=(x[i].getElementsByTagName("DESCR")[0].childNodes[0].nodeValue);
txt="<center><div id='light' class='white_content'><h3>"+title+"</h3><img src='"+img+"' height='100' width='200'/><br /><br /><br /><br /><b>Description:</b> "+descr+"<br /><b>How to get?:</b> "+htg+"<br /><br /><br /><a href ='javascript:close();'>Close</a></div><div id='fade' class='black_overlay'></div>";
document.getElementById("showCD").innerHTML=txt;
document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';
}
</script>
</head>
<body>
<div id='showCD'></div><br />
<script type="text/javascript">
document.write("<table border='0,2'>");
for (var i=0;i<x.length;i++)
{
document.write("<td onclick='displayCDInfo("+ i +")'>");
document.write("<img height='50' width='100' src='"+ x[i].getElementsByTagName("IMG")[0].childNodes[0].nodeValue + "'/>");
document.write("</td>");
}
document.write("</table><br /><a href='rw_midway.php'>Back</a>");
</script>
</body>
</html>
<title>Midway Bell ringer rewards - Psmore Test fase</title>
<head>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 30%;
width: 400px;
height: 50%;
padding: 16px;
border: 0px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content a:link {color:black;
</style>
<script type="text/javascript">
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","rw_midway_bellringer.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
x=xmlDoc.getElementsByTagName("CD");
function close()
{
document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';
}
function displayCDInfo(i)
{
title=(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue);
htg=(x[i].getElementsByTagName("HTG")[0].childNodes[0].nodeValue);
img=(x[i].getElementsByTagName("IMG")[0].childNodes[0].nodeValue);
descr=(x[i].getElementsByTagName("DESCR")[0].childNodes[0].nodeValue);
txt="<center><div id='light' class='white_content'><h3>"+title+"</h3><img src='"+img+"' height='100' width='200'/><br /><br /><br /><br /><b>Description:</b> "+descr+"<br /><b>How to get?:</b> "+htg+"<br /><br /><br /><a href ='javascript:close();'>Close</a></div><div id='fade' class='black_overlay'></div>";
document.getElementById("showCD").innerHTML=txt;
document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';
}
</script>
</head>
<body>
<div id='showCD'></div><br />
<script type="text/javascript">
document.write("<table border='0,2'>");
for (var i=0;i<x.length;i++)
{
document.write("<td onclick='displayCDInfo("+ i +")'>");
document.write("<img height='50' width='100' src='"+ x[i].getElementsByTagName("IMG")[0].childNodes[0].nodeValue + "'/>");
document.write("</td>");
}
document.write("</table><br /><a href='rw_midway.php'>Back</a>");
</script>
</body>
</html>
in werking: http://psmore.cz.cc/rewards/rw_midway_bellringer.php
Dank je
Gewijzigd op 29/09/2010 14:16:33 door Jeffrey Barn
Toevoeging op 30/09/2010 07:53:12:
ik moet zie het daar niet in.