Slideshow Array

Slideshow Array

Post by Cindy Jame » Wed, 21 Aug 2002 10:34:12



Hi,
I've been trying to set up a slideshow script but am having some trouble.
This is what I'd like to do: I'd like to use the following script twice on
the same page, in order to have two slideshows next to each other.  I am not
sure how to deal with the array which contains the images.  How can I go
about getting the first function to use the first three images while the
second function using the last three images?  Any help would be greatly
appreciated.  Thanks.

<script>
var image1=new Image()
image1.src="1.gif"
var image2=new Image()
image2.src="2.gif"
var image3=new Image()
image3.src="3.gif"

var image4=new Image()
image4.src="4.gif"
var image5=new Image()
image5.src="5.gif"
var image6=new Image()
image6.src="6.gif"
</script>

<img src="1.gif" name="slide" width="100" height="56">

<script>
var step=1
function slideit()
{if (!document.images) return;
document.images.slide.src=eval("image"+step+".src");
if (step<3) step++; else step=1; setTimeout("slideit()",2500)}
slideit()
</script>

<img src="1.gif" name="slide2" width="100" height="56">

<script>
var step=4
function slideit2()
{if (!document.images) return;
document.images.slide2.src=eval("image"+step+".src");
if (step<3) step++; else step=4; setTimeout("slideit2()",2500)}
slideit2()
</script>

 
 
 

Slideshow Array

Post by Jon Spive » Wed, 21 Aug 2002 20:43:56


Hi Cindy,
if you just change this line in slideit2
 if (step<3) step++; else step=4; setTimeout("slideit2()",2500)}
to
 if (step<6) step++; else step=4; setTimeout("slideit2()",2500)}

it should do what you want

--
Jon
Microsoft MVP - FP
www.genasis.net


Quote:> Hi,
> I've been trying to set up a slideshow script but am having some trouble.
> This is what I'd like to do: I'd like to use the following script twice on
> the same page, in order to have two slideshows next to each other.  I am
not
> sure how to deal with the array which contains the images.  How can I go
> about getting the first function to use the first three images while the
> second function using the last three images?  Any help would be greatly
> appreciated.  Thanks.

> <script>
> var image1=new Image()
> image1.src="1.gif"
> var image2=new Image()
> image2.src="2.gif"
> var image3=new Image()
> image3.src="3.gif"

> var image4=new Image()
> image4.src="4.gif"
> var image5=new Image()
> image5.src="5.gif"
> var image6=new Image()
> image6.src="6.gif"
> </script>

> <img src="1.gif" name="slide" width="100" height="56">

> <script>
> var step=1
> function slideit()
> {if (!document.images) return;
> document.images.slide.src=eval("image"+step+".src");
> if (step<3) step++; else step=1; setTimeout("slideit()",2500)}
> slideit()
> </script>

> <img src="1.gif" name="slide2" width="100" height="56">

> <script>
> var step=4
> function slideit2()
> {if (!document.images) return;
> document.images.slide2.src=eval("image"+step+".src");
> if (step<3) step++; else step=4; setTimeout("slideit2()",2500)}
> slideit2()
> </script>


 
 
 

1. Array to form to array !

Hi there!
Is it possible to save an array in a form-field for submision and then get
the array again.
I seem to be  a little stock here course my form-field tells me not to be an
array.
Ex.
****************************************************************************
*
Making the array:
 MyArray=rs.GetRows()
 numcols=ubound(MyArray,1)
 numrows=ubound(MyArray,2)
.......
Trying to save it in a hidden field:
  <input type="hidden" name="something"
value="<%=MyArray(numcols,numrows)%>">
.......
Try to get the array again:
 MyArray=Request.Form("something")   ' If I response.write IsArray(MyArray)
I get: false
****************************************************************************
*

If it is possible :
    How do I put the array in the form-field ?
    How do I get the string (Request.Form("array")) to act as an array ?

I do not know a lot of arrays. Please inform me in details.

Smiling greetings  ;o) ;o) ;o) ;o) ;o)

Pia

2. FS: Amiga Technical Reference, 4 Vol Set, 3rd Printing 1986 $20.00

3. Passing Array Variable to DRW

4. Problem with LoadLibrary and unresolved externals

5. HELP -- accessing server-side array elements

6. RS232 & Hayes AT commands

7. Change array pitch

8. Integer vs. FPU float math

9. How do I pass the Array Number to VBS subroutine from checkbox?

10. Image Arrays

11. Fill Array from a folder

12. Set Null values for empty array...?

13. Help with an array