Log In · Register

 
Problems with single entry code.
Birt
post Mar 25 2006, 01:19 AM
Post #1


Senior Member
***

Group: Member
Posts: 84
Joined: Dec 2005
Member No: 323,797



I've been having problems finding a working code for displaying a single entry on my site and finally came across one. It worked a few times, but now it doesn't work at all. Does anyone know why this is happening or know of a code that is guaranteed to work?
 
 
Start new topic
Replies
Birt
post Mar 25 2006, 01:58 AM
Post #2


Senior Member
***

Group: Member
Posts: 84
Joined: Dec 2005
Member No: 323,797



I'm using Internet Explorer.


CODE
<script>
numberOfEntries = 1; //Change this value here...
if(location.pathname=='/disco____onthedancefloor'){
var tds = document.getElementsByTagName ('a');
for (var i = 0; i < tds.length; i++) {
timeString = tds[i].innerText;
if(timeString.match(/\d+:\d+ [ap]m\b/i)){break;}
}
stuff = tds[i].parentNode.parentNode.parentNode.parentNode.parentNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.nextSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibling;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName=='TABLE')
{
stuff.nextSibling.removeNode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none';
}}
</script>


My Xanga.

I apologize for not putting it in the post above.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: