#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    8
    Rep Power
    0

    Unhappy Please help a javascript newbie!


    im adding a scrolling text box function to a website that was developed by another company, and i found a script that worked until i actually put it into the page.

    it seems that the pre-existing javascript is conflicting w/the new text box scroll javascript (im just guessing b/c when i removed the other js functions, the scroll worked fine)...i need for all the previous functionality to remain the same whilst indluding this new script, but i am really not familiar w/javascript (i'm only at a cut-and-paste-the-code-in-to-make-it-work level)

    could someone have a look at the page and see if you can tell where the conflict is coming from ?? i dont know where to start.

    here's the URL:
    http://www.keenerassociates.com/DRAFT/home1.html

    thanks in advance to whoever can help me!
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    Don't have time to look that in depth I'm afraid, but what I did notice is that your browser test won't identify NS6 as it doesn't support layers or the document.all method.

    var isNS = (navigator.appName == "Netscape");

    would simply test for Netscape, but if you want to test for versions then:

    var isNS6 = ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") != -1));
    var isNS4 = ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") == -1));

    will do the trick.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    8
    Rep Power
    0
    cheers...i suppose that's good thing to know as well!!!

    thanks for taking the time
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    Possibly, you haven't set the timer so when you try to clear it then there's nothing there to clear. In otherwords:

    clearTimeout(movedownvar)

    cannot be done if movedownvar isn't set as a timeout. This is an error that flashes up in IE. 'movedownvar' is undefined.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    8
    Rep Power
    0

    Unhappy


    yeah...that's what others seem to be saying....and that makes sense to me...only prob is that i really dont even know where to set that variable!..(im THAT much of a beginner!)

    ive been sitting here for over and hour by myself trying to work it out and have had no success.....

    i know that lines 349 and 352 are where the probs are...but i havent been able to figure out what to change it to!...or if i change the code elsehwere...or what.....
  10. #6
  11. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    Well neither the moveup or movedown functions are visible so I can't tell you what the error could be there!
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    8
    Rep Power
    0

    Unhappy progress.....but not quite there....


    good news.... i did get the function to actually work - the arrows are now scrolling the text - but the layout is wrong.....as you will see here......

    http://www.keenerassociates.com/DRAFT/home3.html

    this is how it should look:

    http://www.keenerassociates.com/DRAFT/home1.html


    (ive turned the borders on for all so you could see what ive done here w/the content)

    is there a way to set the scrolling layer to say 85% scale across the screen - or even a pixel width and at a specific height as well? i've tried doing it in the code, but it's stays static.
    as well, it seems that i cant get the arrows to be seen in the functioning one...and when they ARE viewable, they dont seem to work...(that might have been part of the error problem). in the first version, the layout was good, but, the functionality when nill.

    and now i can get the function working but the layout wont!

    i really dont know what esle to try! sorry to be so helpless!

IMN logo majestic logo threadwatch logo seochat tools logo