Results 1 to 2 of 2

Thread: gAjax pausing scroller not working in IE - a clue

  1. #1
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default gAjax pausing scroller not working in IE - a clue

    1) Script Title: gAjax pausing scroller
    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...sescroller.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...
    this.visiblediv.style.width=this.hiddendiv.style.width="215px"

    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
    pSouper.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    	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:

    Code:
    	this.tickerdivwidth=this.tickerdiv.offsetWidth
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •