Help
-
Search
-
Members
-
Calendar
Full Version:
Code for 2 entrys?
Forums
>
Resource Center
>
Support Center
>
Xanga Support
>
Xanga Resolved Topics
CovenantSpy
Jun 16 2005, 04:36 PM
Is there a code to just have only 2 or 3 entrys showing at a time on you xanga? I found the code for just 1 entry and was wondering if you can edit it for 2 or 3 entrys. If not can someone show me were to get the code.
1 Entry code
<script>
// Display Only One Entry
// By Paul Chen aka Coyote
if(location.pathname=="/home.aspx"){
var longer = false;
var tds = document.getElementsByTagName('td');
for(i=0; i<tds.length;i++)
{
booga = tds[i].innerHTML.indexOf('blogheader');
if(booga==11){longer=false;break;}
boogie = tds[i].innerHTML.indexOf('javascript');
if(boogie == 19){longer=true;break;}
}
var tables = tds[i].getElementsByTagName('table');
var numBreaks = 0;
var x = 0;
if(longer==true){x=3;}else{x=1}
for(j=x; j<tables.length;j++)
{
numBreaks += tables[j].getElementsByTagName('br').length;
tables[j].style.display='none';
}
var divs = tds[i].getElementsByTagName('div');
for(j=2+(2*1)-2; j<divs.length;j++)
{
divs[j].style.display='none';
}
var breaks = tds[i].getElementsByTagName('br');
for(j=breaks.length-5-numBreaks;j<breaks.length;j++)
{
breaks[j].style.display='none';
}
var horizontals = tds[i].getElementsByTagName('hr');
var j = horizontals.length-1;
horizontals[j].style.display='none';
}
</script>
Pulchritude
Jun 16 2005, 04:47 PM
I use this code which can show any ammount of entries but not over 5, it works really good.
-
http://www.createblog.com/forums/index.php?showtopic=30829
CovenantSpy
Jun 16 2005, 04:55 PM
Thanks A Bunch
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.