Results 1 to 3 of 3

Thread: Two scripts on same page...

  1. #1
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two scripts on same page...

    1) Script Title: Script Title: Slideshow and snow falling script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rightslide.htm

    http://www.dynamicdrive.com/dynamicindex3/snow.htm

    3) Describe problem:
    General question....for a couple of years I've tried to include two scripts on the same page and the addition of the second script ALWAYS messes up the first. I'm wanting to use the falling snow script on a webpage that already has a slideshow....getting the word undefined instead of my pictures in the slideshow when I add the snow falling script under the <body>. What am I doing wrong? I've also tried to have mouse trails on pages with slideshow scripts in the past to no avail. Please help!

    Thanks so much for any help!!!

  2. #2
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anyone know how to do this?

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

    Default

    Some of the older scripts on DD will step on one another's toes if two or more of them exist on the same page, due to both trying to access the window.onload event handler. In this case, you can try fixing that by finding the line:

    Code:
    window.onload=fillup
    Inside the slideshow script, and changing that to:

    Code:
    if (window.addEventListener)
    window.addEventListener("load", fillup, false)
    else if (window.attachEvent)
    window.attachEvent("onload", fillup)

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
  •