Post by Craig on Apr 10, 2006 8:56:56 GMT -8
petem said:
petem.proboards75.com<script type="text/javascript">
<!--
var keep = 'yes';
star = 'http://proboards8.com/images/star.gif';
['Primary School Champion', 1],
[‘High School Champion’, 3],
[‘Town Champion’, 7],
[‘County Champion, 10],
[‘National Finalist’, 20],
[‘National Medalist’, 30],
['National Champion’, 40],
[‘Wolrd Youth Champion’, 50],
[‘AAA\'s Champion’, 75],
[‘World Junior Champion’, 100],
[‘European Champion’, 125],
[‘Commenwealth Champion’, 150],
[‘Olympic Medalist’, 175],
[‘Wolrd Champion’, 200],
[‘WR Holder’, 250],
[‘Olympic Champion’, 300],
[‘Double WR Holder’, 400],
['Double Olympic Champion', 500],
['Superhuman', 750],
['God', 1000]
];
td = document.getElementsByTagName("td");
for(i=0; i<td.length; i++)
{
if(td.width == '20%' && td.innerHTML.match(/group/i) && td.parentNode.innerHTML.match(/Posts: (.+?)</))
{
posts = parseInt(RegExp.$1.replace(/,/g,''));
newRank = document.createElement('div');
for(r=rank.length-1; r>=0; r--)
{
if(posts >= rank[r][2])
{
newRank.appendChild(document.createElement('br'));
newRank.appendChild(document.createTextNode(rank[r][0]));
newRank.appendChild(document.createElement('br'));
for(z=0; z<rank[r][1]; z++)
{
newRank.appendChild(document.createElement('img'));
newRank.lastChild.src = star;
}
newRank.appendChild(document.createElement('br'));
break;
}
}
if(keep.toLowerCase() == 'no')
{
td.innerHTML = td.innerHTML.replace(/<br>(.+?)<br><img(.+?)<br>/i,newRank.innerHTML)
}
else
{
td.innerHTML = td.innerHTML.replace(/<br><img(.+?)<br>/i,'<br><img$1' +newRank.innerHTML)
}
}
}
//-->
</script>
Right, I have tried everything I can possibly think of with this code and still can't get it to work!!!!!
Has anybody got any idea's as it is really starting to annoy me!
Sorry, should have said that, don't know why i didn't. What i posted, copy the whole section and change in the code.