Report Template 2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><title>Expandable and collapsible table - demo</title>
<a>
</a>
<script type="text/javascript">
function toggle_visibility(tbid,lnkid) {
if (document.getElementsByTagName) {
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++) {
if (tables[i].id == tbid){
var trs = tables[i].getElementsByTagName('tr');
for (var j = 1; j < trs.length; j+=1) {
trs[j].bgcolor = '#CCCCCC';
if(trs[j].style.display == 'none')
trs[j].style.display = '';
else
trs[j].style.display = 'none';
}
}
}
}
var x = document.getElementById(lnkid);
if (x.innerHTML == '[+] Expand ')
x.innerHTML = '[-] Collapse ';
else
x.innerHTML = '[+] Expand ';
}
function Count_function() {
var pass = "PASS";
var fail = "FAIL";
var count_pass=0;
var count_fail=0;
var targetTable=document.getElementsByTagName("td");
var rowData="";
for (var i=0; i < targetTable.length; i++) {
if (targetTable[i].innerHTML == "PASS") {
count_pass=count_pass+1;
} else if(targetTable[i].innerHTML == "FAIL")
{
count_fail=count_fail+1;
}
}
document.getElementById("total").value = document.getElementsByTagName("table").length;
document.getElementById("pass").value = count_pass;
document.getElementById("fail").value = count_fail;
}
</script>
<style type="text/css">
body {
margin: 3px;
padding: 3px;
border: 1px solid #000000;
}
tr#steps{background-color: rgb(255, 255, 204);}
td { FONT-SIZE: 90%; MARGIN: 0px; COLOR: #000000;
FONT-FAMILY: font-family: Arial;
padding:1px; border:#4e95f4 1px solid;
height: 20px;
width:auto;
}
a {TEXT-DECORATION: none;}
table{text-align: left; margin-left: auto; margin-right: auto; width: auto; height: auto; font-family: Arial;
}
</style>
</head><body><br><div style="text-align: center; font-family: Arial;"><br>
<img style="width: 205px; height: 70px;" alt="http://www.google.com" title="http://www.google.com" src="src.png"><br>
<br><div style="text-align: right;"><small><small>
Total Test Case : <input id="total" type="text"><br><br>
Pass Test Case : <input id="pass" type="text"><br><br>
Fail Test Case : <input id="fail" type="text"><br><br><button onclick="Count_function()">count</button></small>
</small>
<br></div>
<br>
</div>
<table id="tc1" border="0" cellpadding="4" cellspacing="0">
<tbody>
<tr>
<td colspan="1" style="width: 36px; text-align: center;">tc1</td>
<td style="width: 339px; text-align: center;" colspan="1">TCname </td>
<td style="width: 99px; text-align: center;">Program</td>
<td style="width: 189px; text-align: center;">Sub Module</td>
<td style="width: 177px; text-align: center;" colspan="1">Module</td>
<td style="width: 95px; text-align: center;">PASS</td>
<td style="width: 125px; text-align: center;"><a href="javascript:toggle_visibility('tc1','l1');">
<div id="l1" align="right">[+]Expand</div></a></td>
</tr>
<tr id="steps">
<td colspan="2" rowspan="1" style="text-align: left; width: auto;">1.Step name</td>
<td style="text-align: center;">title<br></td>
<td style="text-align: center;">message</td>
<td style="text-align: center;"><br></td>
<td style="width: 95px; text-align: center;">Pass</td>
<td style="width: 125px;"></td>
</tr>
<tr id="steps">
<td colspan="2" rowspan="1" style="text-align: left; width: 339px;">2. Step name</td>
<td style="text-align: center;">title<br></td>
<td style="text-align: center;">mesage-</td>
<td style="text-align: center;"><a href="#"><br></a></td>
<td style="width: 95px; text-align: center;">Pass</td>
<td style="width: 125px;"></td>
</tr>
<tr id="steps">
<td colspan="2" rowspan="1" style="text-align: left; width: 339px;">3. Step name</td>
<td style="text-align: center;">title<br></td>
<td style="text-align: center;">message</td>
<td style="text-align: center;"><a href="#">screenshot</a></td>
<td style="width: 95px; text-align: center;">fail</td>
<td style="width: 125px;"></td>
</tr>
<tr id="steps">
<td colspan="2" rowspan="1" style="text-align: left; width: 339px;">4. Step name</td>
<td style="text-align: center;">title<br></td>
<td style="text-align: center;">message-</td>
<td style="text-align: center;"><a href="#"><br></a></td>
<td style="width: 95px; text-align: center;">Pass</td>
<td style="width: 125px;"></td>
</tr>
</tbody>
</table>
<table id="tc2" border="0" cellpadding="4" cellspacing="0">
<tbody>
<tr>
<td colspan="1" style="width: 36px; text-align: center;">tc2</td>
<td style="width: 339px; text-align: center;" colspan="1">TCname </td>
<td style="width: 99px; text-align: center;">Program</td>
<td style="width: 189px; text-align: center;">Sub Module</td>
<td style="width: 177px; text-align: center;" colspan="1">Module</td>
<td style="width: 95px; text-align: center;">PASS</td>
<td style="width: 125px; text-align: center;"><a href="javascript:toggle_visibility('tc2','l2');">
<div id="l2" align="right">[+]Expand</div></a></td>
</tr>
<tr id="steps">
<td colspan="2" rowspan="1" style="text-align: left; width: 339px;">1.Step name</td>
<td style="text-align: center;">title<br></td>
<td style="text-align: center;">message</td>
<td style="text-align: center;"><br></td>
<td style="width: 95px; text-align: center;">Pass</td>
<td style="width: 125px;"></td>
</tr>
</tbody></table>
<br>
<br>
<br>
<br>
<div style="text-align: center;"><a href="http://google.com">Contact Us | some ERP</a></div>
</body></html>
No comments:
Post a Comment