Forum Moderators: open

Message Too Old, No Replies

Illegal to have more than 1 script?

Beginner question

         

malochio

10:56 pm on Nov 29, 2005 (gmt 0)

10+ Year Member


I have a script on my page that rotates a series of graphics. It's a script I downloaded from one of the free Javascript sites (I am not a programmer). Most of the script is in the header of the page. There is an "onload" statement in the body tag and some additional scripting (placeholders for photos and captions) in the cell the object appears in.

I want to place another script on the same page - one that scrolls text vertically. I've found many such scripts (freebies) that only require pasting the code into the spot on the page where I want the scroller to appear. Most work fine until I reload the page. Then, invariably, the first object (slideshow) disappears while the second one remains in place. Sometimes when I the reload button again, it reappears, but not always.

Can anyone suggest how I might get both of these scripts to work? If the answer involves adding another statement to the body tag (I've seen references to an "onReload" statement), please include instructions on how it gets added. Currently the body tag looks like this:

<body onload=runSlideShow() bgcolor=#000000>

Thanks in advance,
Mal

webdude

5:47 pm on Dec 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this...

<body onload="runSlideShow();secondthingyouwanttodo()" bgcolor=#000000>

SpaceFrog

9:33 am on Dec 2, 2005 (gmt 0)

10+ Year Member



<body onload="runSlideShow();secondthingyouwanttodo();" bgcolor=#000000>

an ending ; is even more correct

webdude

12:43 pm on Dec 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oops! Your right SpaceFrog. I missed that :-0