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 =
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
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
-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
Rick,
Try this:
cfset myList = soundTrack01.mp3,soundTrack02.mp3,soundTrack03.mp3
cfset listPosition = 1 /
cfoutput
script
cfloop list=myList index=listElement
$.sound.play('#myList.name[listPosition]#');
cfset listPosition = listPosition + 1 /
/cfloop
/script
/cfoutput
: $.sound.play('#myList.name[listPosition]#');
21 : cfset listPosition = listPosition + 1 /
22 :/cfloop
-Original Message-
From: Drew Nathanson [mailto:d...@technicalsynergy.com]
Sent: Wednesday, June 08, 2011 1:45 PM
To: cf-talk
Subject: Re: How to do this with CF and JS?
Rick
cfset listPosition = listPosition + 1 /
/cfloop
/script
~Dan
-Original Message-
From: Rick Faircloth
Sent: Wednesday, June 08, 2011 2:03 PM
To: cf-talk
Subject: RE: How to do this with CF and JS?
Hmmm... it didn't like that one either:
You have attempted to dereference a scalar variable
: 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
Thanks for that, Dan... one step closer...
-Original Message-
From: Dan Blickensderfer [mailto:d...@blickensderfer.com]
Sent: Wednesday, June 08, 2011 2:28 PM
To: cf-talk
Subject: Re: How to do this with CF and JS?
Rick,
Is this how you want to source code to look on the page
this with CF and JS?
Are you trying to queue the sound tracks up to play one after the other?
On 6/8/2011 10:25 AM, Rick Faircloth wrote:
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
play.sound command line)
outside the DOM, then reinsert it.
Make sense?
-Original Message-
From: Carl Von Stetten [mailto:vonner.li...@vonner.net]
Sent: Wednesday, June 08, 2011 2:41 PM
To: cf-talk
Subject: Re: How to do this with CF and JS?
Are you trying to queue the sound
Ooohhh... I'll have to check that out! Haven't used
those tags before!
Thanks for the tip, Carl!
Rick
-Original Message-
From: Carl Von Stetten [mailto:vonner.li...@vonner.net]
Sent: Wednesday, June 08, 2011 5:00 PM
To: cf-talk
Subject: Re: How to do this with CF and JS?
Could you
beautiful use of JSStringFormat() Isaac!You know I
fought with errant '
and in my JS for like a year and a half before
discovering this function.
Now, doesn't the below creae an array of 3d arrays?A
true 3D array is nto
available like CF, IIRC.Anyhoo, I've used the below
approach also
-0400
Subject: RE: CF and JS question
To: CF-Talk [EMAIL PROTECTED]
beautiful use of JSStringFormat() Isaac!You know I
fought with errant '
and in my JS for like a year and a half before
discovering this function.
Now, doesn't the below creae an array of 3d arrays?A
true 3D array is nto
Actually, JS supports associative arrays also.So,
foo['apple'] =
fruit is perfectly fine.Hence the need for
JSStringFormat() when
creating these via CF, in case there's a ' or something.
Doug
Ahh... Well I've always just used Object() for that -- which is also
what cfwddx uses... I suspect
: Saturday, August 28, 2004 1:04 PM
To: CF-Talk
Subject: Re: CF and JS question
Actually, JS supports associative arrays also.So,
foo['apple'] =
fruit is perfectly fine.Hence the need for
JSStringFormat() when
creating these via CF, in case there's a ' or something.
Doug
Ahh... Well I've
.
Doug
- Original Message -
From: Jim Davis [EMAIL PROTECTED]
Date: Sat, 28 Aug 2004 14:11:16 -0400
Subject: RE: CF and JS question
To: CF-Talk [EMAIL PROTECTED]
In _javascript_ associative arrays are always Objects - doing new Object
always creates an associative array (or, more specifically
)#'] = '#JSStringFormat(rates.url)#';
/cfoutput
/cfoutput
/cfoutput
Doug
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 4:05 PM
To: CF-Talk
Subject: Re: CF and JS question
_javascript_ arrays are declared a bit differently than CF arrays
The array isnt really the problem, the problem is taking
the array and
populating the select statements.
some puesdocode
for i = 0 to taskArray.arrayLength
for j = 0 to taskArray.arrayDimension
if taskArray.[i,3] = 2
I ... don't think this syntax is correct...
I would expect to see
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 4:05 PM
To: CF-Talk
Subject: Re: CF and JS question
_javascript_ arrays are declared a bit differently than CF arrays.
try this:
var taskArray = new Array();
cfloop index=x from
, 2004 4:05 PM
To: CF-Talk
Subject: Re: CF and JS question
_javascript_ arrays are declared a bit differently than CF arrays.
try this:
var taskArray = new Array();
cfloop index=x from=1
to=#alltasks.recordcount#
taskArray[#x-1#] = new Array(
'#jsstringformat
You have an unnecessary extra loop... (the j loop)
for(i=0;itaskArray.length;i++){
if (taskArray[i][2] == actid)
document.write('option=' + taskArray[i][0] +
'brvalue=' + taskArray[i][1] + 'br');
}
s. isaac dealey954.927.5117
new epoch : isn't it time for a change?
add features without
hey Issac..
yeah I started using your code to generate the JS Array..
var taskArray = new Array();
cfoutput
cfloop index=x from=1
to=#alltasks.recordcount#
taskArray[#x-1#] = new Array(
'#jsstringformat(alltasks.task)#',
'#jsstringformat(alltasks.c_taskid)#',
that works.. I also had to add cfoutput and [x] within the loop.
the problem I'm running into now is that it's leaving the spaces empty
for(i=0;itaskArray.length;i++){
if (taskArray[i][2] == actid)
document.forms['laforma'].c_taskid.options[i] = new
Option(taskArray[i][0], taskArray[i][1]);
you will want to use a vairavle for matches like z
so z=0
loop
if match {
option[z].value;
z=z+1;
}
Code:
document.forms['laforma'].c_taskid.options.length = 0;
y = taskArray.length;
z=0;
for (x=0; xy; x++){ //loop the array if the id= the passed ID then
boom put itin the sub select
FINALLY!
I went with 2 arrays, 2 queries to populate the damn arrays using SQL
to check to see if c_activityid was 2 or 4.
It works..
On Fri, 27 Aug 2004 12:13:24 -0500, Greg Morphis [EMAIL PROTECTED] wrote:
that works.. I also had to add cfoutput and [x] within the loop.
the problem I'm
Sorry Adam, I didnt see your post.. I may go that route but
considering it's given me pains for the past 3 hours :) I think I'm
gonna do something else for a few minutes and calm myself down..
On Fri, 27 Aug 2004 12:42:45 -0500, Greg Morphis [EMAIL PROTECTED] wrote:
FINALLY!
I went with 2
oh yeah or you could look on Macromedia's dev exchange and look for
the UDF (maybe a tag) called 2 releated selects ;) I don't like the
way it is done in that tag though.
Adam H
On Fri, 27 Aug 2004 12:45:14 -0500, Greg Morphis [EMAIL PROTECTED] wrote:
Sorry Adam, I didnt see your post.. I may
well see I have 3 selects twice..
I'm already using the cf multi selects related once, and because of
the code behind that custom tag you cant use it twice on the same
page.
I'd already considered that ;)
On Fri, 27 Aug 2004 14:00:12 -0400, Adam Haskell [EMAIL PROTECTED] wrote:
oh yeah or you
well see I have 3 selects twice..
I'm already using the cf multi selects related once, and
because of
the code behind that custom tag you cant use it twice on
the same
page.
I'd already considered that ;)
Well you probably could, but if you're using an encrypted tag it would
require using
I'm trying to populate a JS two dimensional array using CF..
this is that I have so far
var taskArray = new Array(cfoutput#alltasks.recordcount#/cfoutput,3);
cfoutput query=alltasks
taskArray[#alltasks.task#,#alltasks.c_taskid#,#alltasks.c_activityid#];
/cfoutput
I look at the source and it seems
_javascript_ arrays are declared a bit differently than CF arrays.
try this:
var taskArray = new Array();
cfloop index=x from=1
to=#alltasks.recordcount#
taskArray[#x-1#] = new Array(
'#jsstringformat(alltasks.task)#',
'#jsstringformat(alltasks.c_taskid)#',
)#']['#JSStringFormat(rates.rateplan)#'
]['#JSStringFormat(rates.descr)#'] = '#JSStringFormat(rates.url)#';
/cfoutput
/cfoutput
/cfoutput
Doug
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 4:05 PM
To: CF-Talk
Subject: Re: CF and JS question
I have a cold fusion function that is used by other CF functions.
I've found that a JS function now needs it.Should I just duplicate
it for JS or can it use the CF function?I'd hate to dup it cause
it's the only place where ajs function needs it.
thanks.
--
Daniel Kessler
Department of
I have a cold fusion function that is used by other CF
functions. I've found that a JS function now needs it.
Should I just duplicate it for JS or can it use the CF
function? I'd hate to dup it cause it's the only place
where ajs function needs it.
Client-side _javascript_ run within a
Client-side _javascript_ run within a browser cannot directly invoke a
function written in CF.
ah that makes total sense, said that way : )
And can I guess that the server-side CF, won't call a client-side JS function?I guess I can validate this form in CF, but I'd still like to have the JS
-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: Monday, June 07, 2004 10:20 AM
To: CF-Talk
Subject: need function available for CF and JS
I have a cold fusion function that is used by other CF functions.
I've found that a JS function now needs it.Should I just duplicate
You can't use a CF function in JS. Different syntax You have to
duplicate it (and adapt it to JS).
Pascal
-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: maandag 7 juni 2004 17:20
To: CF-Talk
Subject: need function available for CF and JS
I have
You can't use a CF function in JS. Different syntax You have to
duplicate it (and adapt it to JS).
that's not exactly what I meant.I meant to call the js function from cf, but others have told me that this isn't doable or practicle.Really I just wanted the js alerts.
Still, duplicating
-Talk
Subject: Re: need function available for CF and JS
You can't use a CF function in JS. Different syntax You have to
duplicate it (and adapt it to JS).
that's not exactly what I meant.I meant to call the js function from cf, but others have told me that this isn't doable or practicle.Really
And can I guess that the server-side CF, won't call a
client-side JS function?
That's correct.
I guess I can validate this form in CF, but I'd still like
to have the JS alerts rather than go to another page, just
to say hey fill in the header, guy!.
It sounds to me like you want to have
this.
Pat
cfoutput
function new_fnc() {
} /cfoutput
-Original Message-
From: daniel kessler [mailto:[EMAIL PROTECTED]
Sent: Monday, June 07, 2004 12:32 PM
To: CF-Talk
Subject: Re: need function available for CF and JS
You can't use a CF function in JS. Different syntax You
Forgive me if this same question was going through from my work email, I am having
problems with that email.
My question was the following:
I have a CF page with 7 form elements on it: 3 select boxes, 2 multi select boxes and
2 buttons.
I am populating the 3 select boxes and 1 multi select
: CF and JS
Forgive me if this same question was going through from my work email, I
am having problems with that email.
My question was the following:
I have a CF page with 7 form elements on it: 3 select boxes, 2 multi
select boxes and 2 buttons.
I am populating the 3 select boxes and 1
there is a custom tag two_selects_related and there is a tag
three_selects_related. Looks like you want 4, but you can check macromedia
developer exchange.
On Sun, 18 Aug 2002, Mike Tangorre wrote:
Forgive me if this same question was going through from my work email, I am having
problems
]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, August 18, 2002 2:59 PM
Subject: CF and JS
Forgive me if this same question was going through from my work email, I
am having problems with that email.
My question was the following:
I have a CF page with 7 form elements on it: 3 select boxes, 2 multi
Subject: Re: CF and JS
Hi Mike:
I threw together a quick (basic) javascript that allows you to select 1 of
3
states, then one of 3 cities, then one of 3 streets.
It's at http://130.13.170.56:6699/bigArray.html
you can view the source to see what the arrays look like. Since I assume
your
Is there anyway to detect if a browser has javascript enabled/disabled using
CF?
Michael T. Tangorre
Resident Assistant - Brick
Web Applications Developer
A.U. Webteam Slave :-)
AIM: CrazyFlash4
, December 14, 2001 11:56 AM
To: CF-Talk
Subject: CF and JS
Is there anyway to detect if a browser has javascript
enabled/disabled using
CF?
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com
Yes, and no. CF is server-side; it's interaction with the browser consists
of just HTTP POST and GET, which has nothing to do with JS. However, you
can have the browser tell CF if JS is enabled.
in your application.cfm:
cfparam name=session.hasJS default=no
in your first page on your site
this is what i used.
noscript
meta http-equiv=refresh content=0; URL=http://mydomain/detect.
cfm
/noscript
on detect.cfm, do your conditional processings there.
Nick Han
[EMAIL PROTECTED] 12/14/01 08:56AM
Is there anyway to detect if a browser has javascript enabled/disabled
51 matches
Mail list logo