STIAdmin
12-24-2007, 01:39 AM
1) Script Title: Ultimate Fade-in slideshow (v1.51)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
3) Describe problem:
Happy Holidays to all of you!
This is my first time posting. I'm working on a web project and trying to get this done before the first of the year. The limitation is that I'm using an out of the box program. So, I have two choices: Its either I wait several weeks to months for the developers of the "out of the box" program by submitting an addition request (which I have done two weeks ago) or... I get this JS code figured out. The latter method is probably the best bet in terms of time constraints that I am currently facing.
This it the first time I've really dug into JS. My JS knowledge is very limited and I could write very simple JS, that is about it. I have a form that I'm building that outputs data in between < script > .... </ script >. The data output begins at number 1 of the array. It is shown below
Output Code: ( javascript )
<!-- BEGIN OUTPUT FROM MY SITE ***
<script type="text/javascript">
var fadeimages=new Array()
fadeimages[1]=["../Portals/3/PropertiesImages/thm_host_20071209_035346.jpg", "http://www.google.com", ""]
fadeimages[2]=["../Portals/3/PropertiesImages/thm_host_20071209_091810.jpg", "http://www.google.com", ""]
fadeimages[3]=["../Portals/3/PropertiesImages/thm_host_20071209_094217.jpg", "http://www.google.com", ""]
fadeimages[4]=["../Portals/3/PropertiesImages/thm_host_20071209_094947.jpg", "http://www.google.com", ""]
fadeimages[5]=["../Portals/3/PropertiesImages/thm_host_20071209_095901.jpg", "http://www.google.com", ""]
fadeimages[6]=["../Portals/3/PropertiesImages/thm_host_20071209_100204.jpg", "http://www.google.com", ""]
fadeimages[7]=["../Portals/3/PropertiesImages/thm_host_20071209_111622.jpg", "http://www.google.com", ""]
var fadebgcolor="white"
</script>
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
</script>
*** END OUTPUT FROM MY SITE-->
I copied the JS from this site: http://www.dynamicdrive.com/dynamic...inslideshow.htm
I tried changing this piece of the code:
Code: ( javascript )
for (p=1;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
Originally, p=0. It did not work when I changed to p=1. I also attempted to change other variables in an attempt to get it to start the array at 1 as opposed to 0.
How can I get the javascript code to work when I'm faced with an array that begins at fadeimages[1] as opposed to beginning at fadeimages[0]? What variable(s) do I need to change in order to make this work with the array beginning at fadeimages[1]?
Thank you,
-E
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
3) Describe problem:
Happy Holidays to all of you!
This is my first time posting. I'm working on a web project and trying to get this done before the first of the year. The limitation is that I'm using an out of the box program. So, I have two choices: Its either I wait several weeks to months for the developers of the "out of the box" program by submitting an addition request (which I have done two weeks ago) or... I get this JS code figured out. The latter method is probably the best bet in terms of time constraints that I am currently facing.
This it the first time I've really dug into JS. My JS knowledge is very limited and I could write very simple JS, that is about it. I have a form that I'm building that outputs data in between < script > .... </ script >. The data output begins at number 1 of the array. It is shown below
Output Code: ( javascript )
<!-- BEGIN OUTPUT FROM MY SITE ***
<script type="text/javascript">
var fadeimages=new Array()
fadeimages[1]=["../Portals/3/PropertiesImages/thm_host_20071209_035346.jpg", "http://www.google.com", ""]
fadeimages[2]=["../Portals/3/PropertiesImages/thm_host_20071209_091810.jpg", "http://www.google.com", ""]
fadeimages[3]=["../Portals/3/PropertiesImages/thm_host_20071209_094217.jpg", "http://www.google.com", ""]
fadeimages[4]=["../Portals/3/PropertiesImages/thm_host_20071209_094947.jpg", "http://www.google.com", ""]
fadeimages[5]=["../Portals/3/PropertiesImages/thm_host_20071209_095901.jpg", "http://www.google.com", ""]
fadeimages[6]=["../Portals/3/PropertiesImages/thm_host_20071209_100204.jpg", "http://www.google.com", ""]
fadeimages[7]=["../Portals/3/PropertiesImages/thm_host_20071209_111622.jpg", "http://www.google.com", ""]
var fadebgcolor="white"
</script>
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
</script>
*** END OUTPUT FROM MY SITE-->
I copied the JS from this site: http://www.dynamicdrive.com/dynamic...inslideshow.htm
I tried changing this piece of the code:
Code: ( javascript )
for (p=1;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
Originally, p=0. It did not work when I changed to p=1. I also attempted to change other variables in an attempt to get it to start the array at 1 as opposed to 0.
How can I get the javascript code to work when I'm faced with an array that begins at fadeimages[1] as opposed to beginning at fadeimages[0]? What variable(s) do I need to change in order to make this work with the array beginning at fadeimages[1]?
Thank you,
-E