function BreakOnSpace(str, num) {
if(str.length > num)
{
var extraStr = str.substring(num + 1, 20)
if(extraStr.indexOf(' ') > -1) {
var pos = extraStr.indexOf(' ')
var extraLen = pos
extraStr = extraStr.substring(0, pos);
extraStr += '......';
return str += extraStr;
}
}
else
return str;
}
Wednesday, July 29, 2009
Subscribe to:
Posts (Atom)