PDA

View Full Version : Advanced RSS Ticker (Ajax invocation) - Limit Description



up2date
07-06-2006, 06:31 AM
1) Script Title: Advanced RSS Ticker (Ajax invocation)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/rsstickerajax/rsstickerajax.zip

3) Describe problem:

I was wondering if there is a way to limit the letters in the description to something.

At the moment if i have a rss feed with alot of text to blows out my page.

Regards,
Scott

ddadmin
07-06-2006, 08:50 AM
The easiest way is probably just to edit rssticker.js. Locate the line:


var description='<div class="rssdescription">'+this.description[this.pointer]+'</div>'

and change that to:


var description='<div class="rssdescription">'+this.description[this.pointer].substr(0, 200)+'</div>'

200 above means the max number of characters displayed will be 200.

up2date
07-07-2006, 12:08 AM
Hello

Thanks for your help worked a treat.

Again thank you very much.

Regards,
Scott