View Full Version : gAjax pausing scroller not working in IE - a clue

07-27-2009, 02:17 PM
1) Script Title: gAjax pausing scroller
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/gajaxpausescroller.htm

3) Describe problem: I have installed this script and have it working perfectly on FF3 & Safari4 on Mac and PC as well as Chrome but couldn't get it to show on IE 6, 7 or 8.

I had not modified the scripts - only the css and included it within my cms content (this is why I havn't reported it as a bug yet)

I have managed to track the problem down to two lines of code and by hard-coding the div width value, get the scripts to work perfectly even in IE :)

The lines 62 and 83 where i think IE is having trouble ascertaining the width or the div - possibly if it is not pre set in css or something.

I have change both lines to...

but would really love to know if thisis a bug in the script of in my css and what a recommended solution would be - so that I do not need to hardcode the widths.

Thanks in advance for any help

07-27-2009, 08:24 PM
The script assumes that an explicit width will be defined for each scroller as part of the global CSS. To get the script to try and determine the width dynamically, try finding the below line inside scroller.js:

this.tickerdivwidth=this.tickerdiv.currentStyle? parseInt(this.tickerdiv.currentStyle["width"]) : this.tickerdiv.offsetWidth //IE has trouble getting offsetWidth while page is loading, so use global CSS value instead

and change that to: