Results 1 to 5 of 5

Thread: Pausing up-down Scroller - "undefined"

  1. #1
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Pausing up-down Scroller - "undefined"

    Script: Pausing up-down Scroller

    Hi Everyone

    I have searched through the forum and found a few references to "Undefined" relevant to the Pausing up-down Scroller.

    However, none appear to answer the problem I am having.

    The scroller works, it's just that on the FIRST pass through, after the last item, you always get an 'UNDEFINED' message.

    The scroller then works faultlessly, untill you change or refres a page.
    This is frustrating more than anything.

    In my case, the data for the scroller is being populated from an Access Database

    View the site at CLICK HERE

    The site is under development at the moment and only one page exists in the scroller (right hand column - Current News). I have tried it with multiple pages with the same result.

    TIA for any and all help

    Regards, John
    Last edited by johnb; 06-05-2006 at 08:38 AM.

  2. #2
    Join Date
    May 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I also noticed the "undefined" and it happened when I had only one item in array [0] to scroll. So I added a 2nd item in array [1] that was only a space surrounded by quotes - sort of a null, if you will. That made the undefined go away.

    However, the way the script won't start the 2nd item until the first scrolls off, that resulted in a long wait for the first item to recycle.

    I think the script must not check for the end of the array until after it processes array [1], and maybe it should check earlier. If I'm reading your msg correctly, however, you tried it with more than array [0] loaded and got the same undefined problem. So there may be multiple causes of undefined.

    Hopefully, an expert will comment.

  3. #3
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Jerol

    Thanks for the reply

    Interesting, I had tested the scroller with more than 1 item, but just did it again, just to make sure and it works perfectly now with 2 News Items added.

    Ok, hopefully that will allow someone with more experience with Javascript than me (and thats not hard) to pin point the spot that is causing this error.

    I think it has to do with this section of the script, but I could be completely wrong here

    // -------------------------------------------------------------------
    // setmessage()- Populate the hidden div with the next message before it's visible
    // -------------------------------------------------------------------

    this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1

    Now I have tried varying options with the math here and can't seem to get it to remove the 'undefined' message, so maybe I am completely off base, it just appears this could be the problem area

    Hope someone can help resolve this. Whilst it may not seem much and it disappears with more than one item in the array, it would be nice to resolve.

    TIA again.

    John

  4. #4
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, now this is getting wierd

    Scroller on this site is working on FF, but all of a sudden I am getting Javascript errors on IE and the scroller does not work past the first pass.
    This was working on IE yesterday ???

    Any help would be appreciated.

    Thanks, John

  5. #5
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, 1 thing fixed, now workign in IE again, removed a Ad Bloacker and it started working.

    Only need to fix the Undefined now .... anybody?
    Last edited by johnb; 06-08-2006 at 02:18 AM.

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
  •