SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just download a script from Dynamic Drive, the script being: http://www.dynamicdrive.com/dynamici...rollerlink.htm

    I downloaded that, and followed the directions, and tried to install it on my site. Here is where the problem came into play.

    I tried to install it here: http://www.finheaven.com/checkit.shtml (right under the main logo, by the arrows). But, as you can see, it just shows the arrows, no links, while it should show the links too. So, I went backwards, to try and solve the problem and thought I should put the script on a blank page here: http://www.finheaven.com/scrollerlink.htm

    On a totally blank page, the script works. But when it is on a page with other information, it does not, why?

    I would appreciate any help. Thanks.

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's because of the <div align="center"> surrounding your page contents. Change this to <div id="pagewrapper" align="center">, then adjust your script as follows:

    Code:
    function fillup(){
    if (document.all){
    pagewrapper.test2.innerHTML=menucontents
    actualwidth=test2.offsetWidth
    }
    else if (document.layers){
    ns_scroll=document.pagewrapper.document.ns_scrollmenu.document.ns_scrollmenu2
    ns_scroll.document.write(menucontents)
    ns_scroll.document.close()
    actualwidth=ns_scroll.document.width
    }
    }
    window.onload=fillup
    [Edited by kyank on 09-17-2000 at 03:26 PM]
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #3
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that, and it didn't work. Thanks anyhow... any one else have an idea?

  4. #4
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What error message(s) are you getting? Double-click the small error icon in the lower-left of the MSIE window to find out.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  5. #5
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I don't get any error message. It just sits there and does the same thing it did before, nothing. I uploaded the site with the changes you recommended, just so you could see.

  6. #6
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hmm for some reason the document's onLoad event handler isn't firing. As a first step, I'd run your page through an HTML validator. In browsing your code, I've noticed several problems including a second set of <head> and <body> tags, unmatched quotes (e.g. <a href=#"> ), and others. An HTML validator would help correct all these problems, and hopefully serve to un-confuse Internet Explorer enough that it will correctly fire the onLoad event.

    [Edited by kyank on 09-17-2000 at 03:31 PM]
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  7. #7
    SitePoint Zealot
    Join Date
    Sep 1999
    Location
    North America
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is due to two scripts on your page both accessing the BODY onload event- the scroller link script, and Dynamic countdown script. In other words, there are two "window.onload" references on your page.

    To save myself some typing, I'll simply refer you to the following tutorial to see how to resolve such a conflict: http://www.wsabstract.com/javatutors/multiplejava.shtml

  8. #8
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Good spot, GeorgeC!

    Just comment out the following two lines in your code by typing "//" at the start of them:

    Code:
    window.onload=fillup
    window.onload=start_countdown
    Then, in your <body> tag (once you've removed the second set of <head> and <body> tags), add:

    Code:
    <body ... onLoad="fillup();start_countdown();">
    That should do it! Try it with and without the modifications I provided above to see which works.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  9. #9
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What would be a good HTML Validator?

  10. #10
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IT WORKS!

    http://www.finheaven.com/checkit.shtml

    Thank you guys so much for helping me out, I would of never of figured that one out.

    Would you still be able to tell me a good HTML Validator? I use FrontPage, and many people say it messes with the code, so perhaps I should use it anyways.

    Once again, thanks a lot!

  11. #11
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  12. #12
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again!


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
  •