thanks Danny,
I entered your code exactly as you posted but it didn't work. I was able to get the following code to work:
<script language="" type="text/javascript">
<!--
for (x = 0; x < 3; x++)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">");
var tread = threads[x].title;
if (tread.length > 30)
{
document.writeln(tread.substring(0,30))
document.writeln("... ")
}
else
{
document.writeln(tread)
document.writeln(" ")
}
document.writeln("</a>");
document.writeln("Posted "+threads[x].threaddate+" at "+threads[x].threadtime+" by "+threads[x].poster+"<br />");
}
//-->
</script>
I'm sure it could be cleaned up.
One thing I still need is code that will count out to the character limit and then break at the end of the closest word such that the last word in the string is not a partial word.
Any idea how to add that?
Thanks
|