Unfortunately, no... The result is the same. Since the js works client side and the cf works server-side, I assume that the js can't be "re-initialized" like we've tried.
I may need to set this up to be scripted (both CF and JS) in CFC function that will write the CF and JS back into the DOM with each loop. That works with other types of JS "re-initialization". I was hoping for something simpler. Any other ideas? Rick -----Original Message----- From: Scott Stewart [mailto:[email protected]] 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 <[email protected]> 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:345122 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

