Help
-
Search
-
Members
-
Calendar
Full Version:
about one entry with next button
Forums
>
Resource Center
>
Support Center
>
Xanga Support
>
Xanga Resolved Topics
matthew999
May 1 2005, 11:11 PM
I have put the following code in my Web stats
<script>
numberOfEntries = 1; //
if(location.pathname=='/home.aspx'){
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')
{
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none';
}}
</script>
It work, and it can show the Next 5 button ,
but when I clicked that ,it really jump to the last entry on this page
For example,Today is 2/5 ,after I clicked this ,It jump to 27/4.....
I wanna show 1/5 when I press this...help
xenosaga
May 2 2005, 04:03 AM
try this one:
<!-- begin code provided by createblog.com -->
<!-- begin code provided by createblog.com -->
<script language="javascript">
<!--
var links = document.getElementsByTagName ('a');
for (var l = 0; l < links.length; l++) {
str = links[l].innerHTML;
if (str.match (/\d+:\d+ (am|pm)/i)) links[l]
else if (str.match (/Next 5/i)) links[l].innerHTML = str.replace (/Next 5/i, "Next");
else if (str.match (/Previous 5/i)) links[l].innerHTML = str.replace (/Previous 5/i, "Back");
}//-->
</script>
<!-- end code provided by createblog.com -->
<!-- end code provided by createblog.com -->
matthew999
May 2 2005, 04:47 AM
QUOTE(xenosaga @ May 2 2005, 4:03 AM)
try this one:
<!-- begin code provided by createblog.com -->
<!-- begin code provided by createblog.com -->
<script language="javascript">
<!--
var links = document.getElementsByTagName ('a');
for (var l = 0; l < links.length; l++) {
str = links[l].innerHTML;
if (str.match (/\d+:\d+ (am|pm)/i)) links[l]
else if (str.match (/Next 5/i)) links[l].innerHTML = str.replace (/Next 5/i, "Next");
else if (str.match (/Previous 5/i)) links[l].innerHTML = str.replace (/Previous 5/i, "Back");
}//-->
</script>
<!-- end code provided by createblog.com -->
<!-- end code provided by createblog.com -->
THX FOR YOUR HELP BUT IT CAN'T WORK,,,ANYWAY,thank you
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.