|
Post by Wormopolis on Aug 18, 2009 21:36:34 GMT -8
Browser Tested: IE and FF placement: Board or Global Footer
puts a long list of sub-boards under a board page into a scrolling DIV. use variable to set height.
code:
<script type="text/javascript"> <!-- // scrolling sub-boards // by Wormopolis - www.wormocodes.com // v 0.9 // Do Not Repost - Keep Header Intact
var subTableHeight=200;
if (location.href.match(/board=/) && !location.href.match(/thread=/)) { for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds[i].colSpan==2 && tds[i].className=='titlebg' && tds[i].innerHTML.match(/Sub-Boards/)) { subTable=tds[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; safetable=document.createElement('table'); safetable.insertRow(0); safetable.rows[0].insertCell(0);
nwdv=document.createElement('div'); nwdv.style.overflowY="auto"; nwdv.style.height=subTableHeight; subTableHeader=tds[i].parentNode; nwtbl=subTable.cloneNode(true); for (h=1; h<nwtbl.getElementsByTagName('table')[0].rows.length; h++) nwtbl.getElementsByTagName('table')[0].rows[h].style.display="none"; subTable.parentNode.insertBefore(safetable,subTable); //subTable.parentNode.insertBefore(nwtbl,subTable); subTable.parentNode.insertBefore(nwdv,subTable); nwdv.appendChild(subTable); break; } } }
// --> </script>
|
|