Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Zelnen

Zelnen Avatar
Javascriptin'

**
Official Member

91


June 2006
This code adds a new row to the board statistics.



Just edit whats in red.

The first bit in red is the title the second is the image to the left and the 3rd is the infomation inside the box.



<SCRIPT TYPE="text/javascript">
//Copyright of Zelnen

tables = document.getElementsByTagName("TABLE");

for (t=0; t<tables.length; t++){
if (tables[t].getElementsByTagName("td")[0].className == "pformstrip"){
var titlerow = document.createElement("tr");
var otherrow = document.createElement("tr");
var titlecell = document.createElement("td");
titlecell.setAttribute("class", "pformstrip");
titlecell.setAttribute("colspan", 2);
titlecell.innerHTML = "A new row";

var imgcell = document.createElement("td");
imgcell.setAttribute('class', 'row2');
imgcell.setAttribute('width', '5%');
imgcell.setAttribute('valign', 'middle');
var image = document.createElement("img");
image.setAttribute('src', '67.18.37.14/style_images/1/stats.gif');

var infocell = document.createElement("td");
infocell.setAttribute('class', 'row4');
infocell.setAttribute('width', '95%');
infocell.setAttribute('align', 'left');
infocell.innerHTML = "Zelnen's informartion<br>second line<br>ncdancjkdnsacnds";

titlerow.appendChild(titlecell);
tables[t].appendChild(titlerow);

imgcell.appendChild(image);
otherrow.appendChild(imgcell);
otherrow.appendChild(infocell);
tables[t].appendChild(otherrow);

}

}


</SCRIPT>


newBookmarkLockedFalling