hey there, so, i've had the rotating script on my page for a while and i wanted to try putting 3 side by side so that i could show more images without people having to wait for the whole cycle to go thru. i tried just taking the script, copying and pasting three times, inserting <table> at the beginning and all the other table codes in between. however, for some reason, i just can't get it to work. has anyone else tried using multiple scripts on one page like that?
I haven't tried doing that with 3 scripts, but I do have the 1 script in a table and it's showing where it should be. Can you post the html of your table code? Maybe it's missing something.
Originally posted by BizarreTees: Do you mean that if the code is numbering them 1, 2, 3, you would continue the next chunk of code with 4, 5, 6 so the numbers don't overlap?
It depends on the code and how it works. I took a quick look but I'm not experienced enough in scripting to be able to do a quick analysis. Someone with more experience may know. But the question may have already been asked/answered on the Dynamic Drive forums - that's where I'd look first to save myself the trouble.
There are two kinds of things that happen is such scripts. One is the array numbering that keeps the image and links matching, and keeps stuff in order. Usually that is done by setting a variable then incrementing it with each loop.
The second is information about where the re-write occurs. There is usually some kind of name or id given to the "container" where the image and link are written. If more than one container has the same name errors occur.
Here's a link to a tutorial at Dynamic Drive teaching how to run multiple javascripts on a single page. Adding Multiple Javascripts to a Single Page. This should help with makng multiple slideshow scripts run on one page.
Take care
Clint
This message has been edited. Last edited by: Zibuka,
Good link It's important to remember that wherever possible, scripts should have unique names and variables to avoid conflicts. When I was studying C++ in school, it was drilled into us to use completely unique variable names, and often simply adding a two or three letter combination to the front or back of a name would do the trick. Basically, instead of
var = text;
you would use
var = hstext; or var = texths;
where the hs, in my case, might stand for Hectic Studios. It's not a guarantee to solve all conflict problems, but it will go a long way.
I love the script and use it in both of my shops, blogs, my space and anywhere else I can use it.. I have it changed as often as I think about it.. and you can add as many images as you like by just adjusting the script.. You can also adjust the speed..
BTW I Love the fade in effect at thefamouslabel Shop..
I used it at my website ... it looks like it is working on my end. I'm using Firefox on a Mac. If anyone has problems with it, let me know what browser you're using.