PDA

View Full Version : How to put two same scripts in one BODY?



melissagjl
02-19-2007, 11:03 AM
1) Script Title: Translucent Slide Show Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/translucentslide.htm



-->

I want to use this translucent slide show script. but i wan to put two of them in the <body> but there will be error on page if i put two of them.

So how do i modify it so the body can contain two of the same script?

mburt
02-19-2007, 11:12 AM
Put the script in the <head> and seperate each instance with a semicolon:

window.onload=startit;startit

codeexploiter
02-19-2007, 11:25 AM
A simple solution for having two Translucent slideshow Script based slideshows in a single page is using IFrame.

The way this script is designed this requires more work on it to make this script a more reusable one but without wasting the time if you want to display two slideshows in a single page you can go for an IFrame in which you can load your second slideshow.


<iframe frameborder="0" height="225" src="3.htm" width="100%" scrolling="no"></iframe>

You can place the above kind of code in your page where you have the first slideshow already.

3.htm is the page where you have placed the second slideshow which you want. This slideshows will be displayed as if they are a part of single page.

The height and width of the IFrame can be altered based on the image height width of your second slideshow.


window.onload=startit;startit

I wonder how this is going to start two different slideshows in the same page?

melissagjl
02-19-2007, 11:35 AM
er.. thanks for the help..

but, to use the iframe, for the 2nd slideshow to be loaded..

i don't have another page where by i put my that slideshow inside.

I'm doing the coding inside blogspot... therefore.. there is only one template where by i do all the coding inside.

so the two translucent slide shows will be in the same page of coding.

codeexploiter
02-19-2007, 11:49 AM
In that case have to redesign the script in such a way that it will work with more than one slideshows.

melissagjl
02-19-2007, 11:50 AM
Haa... thats why i'm asking here how to redesign it... so that it can work together...

i know there is something i have to change inside the coding.. but i do not know which value i have to change..

codeexploiter
02-19-2007, 12:02 PM
It is not like changing a single value and suddenly the script start to work with multiple slideshows. You have to completely redesign the way the script developed at the moment.

A complete redesign will take some time.

Another solution is if you have a site you can create a page in that site and using IFrame from your blog page access them and it will display the second slidshow perfectly.

If you don't have a site then you can try a free hosting provider who hosts page without any ad and that will do your goal.

melissagjl
02-19-2007, 12:06 PM
ok. thanks for the replies.. i'll think about doing the coding. =)