|
Post by CrAzY_J on Apr 13, 2005 19:09:21 GMT -8
Cross Browser
Main Footers <script> /* Hide/Show categorie created by CrAzY_J do not redistribute code */
function hideshow(cat){ var Tr=document.getElementsByTagName('tr') for(r=0;r<Tr.length;r++){ with(Tr[r]){ if(cells[0].className=='catbg' && cells[0].colSpan=='5' && cells[0].innerHTML.match(cat) && cells[0].align!='right'){ for(c=r+1;c<Tr.length;c++){ if(TD[2].innerHTML.match(/welcome/i) && Tr[c].innerHTML.match(/info center/i)){ break; } if(Tr[c].cells[0].className=='catbg'){ break; }else if(Tr[c].style.display=='none'){ Tr[c].style.display=''; }else{ Tr[c].style.display='none'; } } } } } }
var TD=document.getElementsByTagName('td') for(t=0;t<TD.length;t++){ with(TD[t]){ if(className=='catbg' && colSpan=='5' && align!='right'){ var inn=getElementsByTagName('b')[0].innerHTML; innerHTML=innerHTML.replace(inn,"<a href='javascript:hideshow(\""+inn+"\");'>"+inn+"</a>") } } } </script>
Preview
Last Edit: Apr 19, 2005 14:35:25 GMT -8 by CrAzY_J
|
|
|
Post by Uchiha Susuke on Apr 13, 2005 19:21:56 GMT -8
it's good...all except on the last category, it takes out the infocenter with it
|
|
|
Post by CrAzY_J on Apr 13, 2005 19:29:10 GMT -8
it works fine for me =/ but ill look into this
|
|
|
Post by Kenshin on Apr 13, 2005 23:07:51 GMT -8
Sa US said when you click on the last Categorie it hides the Info Center also =/
|
|
|
Post by Infection X on Apr 14, 2005 13:36:41 GMT -8
You have two <script> tags and way too much spacing after the }} Same info center bug with me too.
|
|
|
Post by CrAzY_J on Apr 14, 2005 17:16:11 GMT -8
its all because you guys are freaking guests. usuually the loop would break whenit meets a catbg, and guests cant see the markallboardsread catbg, so it just skipped to the on in the info center >_>
|
|
|
Post by CD on Apr 14, 2005 17:27:53 GMT -8
Crazy, to fix that, count back from the Info Center, and add a catbg td right above it, but make height equal to 0.
|
|
|
Post by CrAzY_J on Apr 14, 2005 17:37:43 GMT -8
Crazy, to fix that, count back from the Info Center, and add a catbg td right above it, but make height equal to 0. i wouldve have done that, but whywould guest want to hide/show the categorie? its not like they go there often, and if they do the admin prbably wants them to join
|
|
|
Post by Kenshin on Apr 14, 2005 20:59:31 GMT -8
<script> /* Hide/Show categorie created by CrAzY_J do not redistribute code */
Object = document.getElementsByTagName('TD'); for(i=0;i<Object.length;i++){ if(Object.item(i).innerHTML.match('Guest'); window.location="index.cgi?action=register" }else{ function hideshow(cat){ var Tr=document.getElementsByTagName('tr') for(r=0;r<Tr.length;r++){ with(Tr[r]){ if(cells[0].className=='catbg' && cells[0].colSpan=='5' && cells[0].innerHTML.match(cat) && cells[0].align!='right'){ for(c=r+1;c<Tr.length;c++){ if(Tr[c].cells[0].className=='catbg'){ break; }else if(Tr[c].style.display=='none'){ Tr[c].style.display=''; }else{ Tr[c].style.display='none'; } } } } } }
var TD=document.getElementsByTagName('td') if(!TD[2].innerHTML.match(/welcome/i)){ for(t=0;t<TD.length;t++){ with(TD[t]){ if(className=='catbg' && colSpan=='5' && align!='right'){ var inn=getElementsByTagName('b')[0].innerHTML; innerHTML=innerHTML.replace(inn,"<a href='javascript:hideshow(\""+inn+"\");'>"+inn+"</a>") } } } } } </script>
Their now they can't even see the main page
Last Edit: Apr 14, 2005 21:00:05 GMT -8 by Kenshin
|
|
|
Post by CrAzY_J on Apr 19, 2005 14:35:58 GMT -8
Works For guests
|
|