Click to See Complete Forum and Search --> : two scripts on one page conflict?
Daria
01-02-2003, 01:24 PM
Hi, guys
I'm not posting scripts yet, maybe it's a known issue...
I have a slideshow script that works on a plain HTML page. However, on the page that has few rollover images (generated by DW) it doesn't. It keeps the blank space allocated for the images in the slideshow, but no images are showing.
The funny part is, that it doesn't give me a javascript error message...
Did anyone run into similar scripts conflict?
AdamBrill
01-02-2003, 01:29 PM
Try checking for variable names or function names that are the same in both places. That is the most common problem for those kind of problems. If you find any that aren't supposed to be the same, just try changing the variable name and check if that works.
Daria
01-02-2003, 01:47 PM
Thanks - just tried that, - still the same glitch.
Any other ideas?
chrisssantry
01-02-2003, 01:51 PM
This is a common problem caused by scripts that use the < body onload="" > tag. To correct it use a < body onload="function1()";function2()"> (Be sure to remove the leading space.)
AdamBrill
01-02-2003, 01:59 PM
If that was the problem, the line should look like this:
<body onload="function1();function2()">
There was an extra quotation mark in there. If that still doesn't work, try posting the code and I'll take a look.
Daria
01-02-2003, 02:52 PM
Sorry, i deleted the code in the original reply,
here is the text format of my working html, try inserting a rollover image and see that nothing happens...
I found another script that works, but I would like to figure this one out, so next time I understand what happens.
Thanks.
AdamBrill
01-02-2003, 06:51 PM
Do your rollovers use an onload in the <body> tag? I took my onload code out of there and put it right here:
<script language="JavaScript">
SlideShow();
//put the onload line here
</script>
then, it worked. So, try doing that, and let me know if it works for you.
Daria
01-03-2003, 09:19 AM
Thanks - it didn't work putting the line there, but it worked when I deleted it altogether. The imgs I have are small enough for me not to worry about preloading.
Thanks again.
D.
AdamBrill
01-03-2003, 10:57 AM
You might want to try putting whatever is in your preload function after this line:
SlideShow();
Don't tell it to run the function, but just take the code out of the function and put it there. I would suggest that you try to get it to work using the preload, since some people have slow connections. Even if it only takes a half a second to load the images every time, that still doesn't look very good. If you want I could post my preload part that works, if it would help you.
Daria
01-04-2003, 11:22 AM
It would help me out a lot - right now I'm having such a case of a brain fog, it'll take me a year and a day to make this work.
AdamBrill
01-04-2003, 11:40 AM
Here's my whole code. You should be able to figure it out by that. If you have any other problems, let me know...
Daria
01-05-2003, 08:59 AM
THANK YOU