< script > ... String.prototype.ellipsis = function(len)...{ value = this; if(value && value.length > len)...{ return value.substr(0, len-3)+"..."; } return value;} </ script > < logic:iterate id ="ResultSet" property ="blockList" > < tr class ="tr3 f_one" > < td width ="10%" align ="left" style ="word-break:break-all" > < td width ="30%" align ="center" > < html:hidden id ="ResultSet" property ="entity/BLOCK_ELSE" /> <!-- <div title='((document.getElementsByName('entity/BLOCK_ELSE')[i++])'> <SCRIPT>document.write(((document.getElementsByName('entity/BLOCK_ELSE')[i++]).value).ellipsis(50))</SCRIPT></div> --> < SCRIPT > ... document.write(((document.getElementsByName('entity/BLOCK_ELSE')[i++]).value).ellipsis(50)) </ SCRIPT > </ td >