Results 1 to 3 of 3

Thread: pausing message scrollers

  1. #1
    Join Date
    Jan 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default pausing message scrollers

    hi,

    i was wondering why mike's dhtml scroller and the pausing message scroller, both in the scrollers section, do no work when using a strict doctype (HTML 4.01 Strict).
    they both work fine when using transitional. i'm not very familiar with the specifics of doctypes, but is there a quick fix so i can still use one of these scroller scripts while maintaining a strict doctype?

    thanks

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

    Default

    This is actually a known issue with older scripts in our archive, as DHTML needs slight modifications when it comes to positioning if your webpage has a strict doctype: http://www.dynamicdrive.com/doctype.htm Now, the entire Scroller's section has officially been scanned through and changes applied to handle doctype, though I recall a few scripts not being modified yet due to unforeseen problems. I suspect the two scripts you mentioned both fall into that category. Unfortunately there was a reason they were left out of the changes, and it may take a while before I can get back and reexamine them.

  3. #3
    Join Date
    Jan 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    pausing up down message scroller

    well the error was actually really simple, basically just a typo

    in the else block of each move() function, just change the line:
    tdiv.style.top=parseInt(scrollerheight);
    to:
    tdiv.style.top=scrollerheight;


    Code:
    function move3(whichdiv){
    tdiv=eval(whichdiv)
    if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
    tdiv.style.top=0+"px"
    setTimeout("move3(tdiv)",scrollerdelay)
    setTimeout("move4(second2_obj)",scrollerdelay)
    return
    }
    if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
    tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
    setTimeout("move3(tdiv)",50)
    }
    else{
    tdiv.style.top=scrollerheight    //this line here was changed
    tdiv.innerHTML=messages[i]
    if (i==messages.length-1) i=0 
    else i++
    }
    }
    how the most simple things can be the most annoying.

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
  •