The script below is not really suitable for that many pictures. It is
preloads all the pictures you tell it to, so it would be really fast after
the first page, but that first ones a bear! ;-)
You best would be to do what Michael did with the cf community pictures.
Which was to store the path to the pictures in the database and use Stuido's
built in data entry wizard. File/New/Data Entry Wizard.
http://www.houseoffusion.com/users/index.cfm
jon
----- Original Message -----
From: "Jones, Becky" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 12:43 PM
Subject: dynamic looping
> is there anyway to make this javascript code more dynamic? i dont want to
> have to type in each individual picture name. i want to go thru my
employee
> directory and that is over 400 people! plus if someone leaves, i will
have
> to maintain this. instead i have all these peoples pics in a database. i
> want to incorporate a little bit of javascript with my cf. is this
possible
> and how would i start. here is the javascript below that i found at
dynamic
> drive:
> <html>
> <head>
> <script language="JavaScript1.2">
>
> /*
> Blending Image Slide Show Script-
> � Dynamic Drive (www.dynamicdrive.com)
> For full source code, 100's more DHTML scripts, and Terms Of Use, visit
> dynamicdrive.com
> */
>
> function reapply(){
> setTimeout("slideit()",2000)
> return true
> }
> window.onerror=reapply
> </script>
> <script language="JavaScript1.1">
> <!--
> var image1=new Image()
> image1.src="firstimage.gif"
> var image2=new Image()
> image2.src="second.gif"
> var image3=new Image()
> image3.src="third.gif"
> //-->
> </script>
> </head>
> <!---If you want more than three images, add the below code to the above:
>
> var image4=new Image()
> image4.src="fourthimage.gif"
>
> where "4" represents the fourth image. If you have a fifth image, add even
> more of those two lines, with "4" changed to "5".
>
> Step 2: Insert the below into the <body> section of your page --->
> <body onLoad="slideit()">
> <a href="javascript:slidelink()" onMouseover="window.status='Click on the
> image to learn more about it!';return true"
> onMouseout="window.status=''"><img src="firstimage.gif" name="slide"
> border=0 style="filter:blendTrans(duration=3)"></a>
> <script>
> <!--
> ////change number of images below
> var number_of_images=3
> //change speed below (in seconds)
> var speed=3
> var step=1
> var whichimage=1
> function slideit(){
> if (!document.images)
> return
> if (document.all)
> slide.filters.blendTrans.apply()
> document.images.slide.src=eval("image"+step+".src")
> if (document.all)
> slide.filters.blendTrans.play()
> whichimage=step
> if (step<number_of_images)
> step++
> else
> step=1
> if (document.all)
> setTimeout("slideit()",speed*1000+3000)
> else
> setTimeout("slideit()",speed*1000)
> }
> function slidelink(){
> if (whichimage==1)
> window.location="link1.htm"
> else if (whichimage==2)
> window.location="link2.htm"
> else if (whichimage==3)
> window.location="link3.htm"
> }
> //-->
> </script>
>
>
>
> *************************************************
> This e-mail, including any attachments, is intended for the
> receipt and use by the intended addressee(s), and may contain
> confidential and privileged information. If you are not an intended
> recipient of this e-mail, you are hereby notified that any unauthorized
> use or distribution of this e-mail is strictly prohibited.
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists