To be clearer, everything works fine, except for the fact that nothing loops. I get the first sound track, "soundTrack01.mp3", played once, and then everything stops.
Re-writing the JS into the DOM with every iteration is the only other possibility I can think of which will allow the JS to be re-initialized with each loop. -----Original Message----- From: Scott Stewart [mailto:webmas...@sstwebworks.com] Sent: Wednesday, June 08, 2011 1:17 PM To: cf-talk Subject: Re: How to do this with CF and JS? this doesn't work? > <cfset myList = "soundTrack01.mp3,soundTrack02.mp3,soundTrack03.mp3"> > > <cfset listPosition = 1 /> > > <cfloop list="myList" index="listElement"> > > > > <script> > <cfoutput> > $.sound.play('#myList.name[listPosition]#'); </cfoutput> > </script> > > > > <cfset listPosition = listPosition + 1 /> > > </cfloop> > On Wed, Jun 8, 2011 at 1:08 PM, Rick Faircloth <r...@whitestonemedia.com> wrote: > > Ok... since this won't work... > > <cfset myList = "soundTrack01.mp3,soundTrack02.mp3,soundTrack03.mp3"> > > <cfset listPosition = 1 /> > > <cfloop list="myList" index="listElement"> > > <cfoutput> > > <script> > > $.sound.play('#myList.name[listPosition]#'); > > </script> > > </cfoutput> > > <cfset listPosition = listPosition + 1 /> > > </cfloop> > > > ... because the javascript (jQuery) can't be looped inside the CF, > how can I loop the jQuery play command and play through the list > of mp3's ??? > > Thanks for any feedback! > > Rick > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345123 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm