Forums > Javascript

Limiting the Max characters of a dynamic string.

July 7, 2010 | 2:07 pm

I’m pretty new to JS and I can’t really write it from scratch, I can just look at code, work out what it’s doing and edit it to achieve the results I want. I have a file I’m looking at and need to limit the number of characters of a dynamic string.

Basically, there is a ShortDesciption that dynamically pulls in the name of a product. I need to limit this ShortDesciption to about 50 characters. Any help

Code:

+ product.ProductNumber + ".001?hei=120&wid=120&op_sharpen=1′ height=’120′ width=’120′ border=’0′ alt=" />n"
+ "

" + product.ShortDescription + "


Viewing 1 post (of 1 total)