Mixing CF and JavaScript.

2006-11-14 Thread Jason T. Slack
I am on Day 5 with CF and Coming along nicely. I have a question on mixing CF and Javascript. Say I have the following with an onBlur event: input type=textfield name=upc id=upc size=12 maxlength=12 onblur=lookUpUPC(this.value); / Here is the JS for LookUpUPC() function lookUpUPC(upc

Re: Mixing CF and JavaScript.

2006-11-14 Thread Jake Churchill
on mixing CF and Javascript. Say I have the following with an onBlur event: input type=textfield name=upc id=upc size=12 maxlength=12 onblur=lookUpUPC(this.value); / Here is the JS for LookUpUPC() function lookUpUPC(upc) { cfquery name=ckUPC datasource=#application.dsn

Re: Mixing CF and JavaScript.

2006-11-14 Thread Rob Wilkerson
On 11/14/06, Jason T. Slack [EMAIL PROTECTED] wrote: I am on Day 5 with CF and Coming along nicely. I have a question on mixing CF and Javascript. Say I have the following with an onBlur event: input type=textfield name=upc id=upc size=12 maxlength=12 onblur=lookUpUPC(this.value); / Here

RE: Mixing CF and JavaScript.

2006-11-14 Thread Ian Skinner
So I must be doing something wrong but I am not sure what. Can anybody shed some light? -Jason ColdFusion runs on the server and Javascript runs on the client and the two don't mix. Ok, they can be made to look like they mix with Ajax and other techniques, but this isn't beginner stuff.

RE: Mixing CF and JavaScript.

2006-11-14 Thread Munson, Jacob
You need to use AJAX. I agree, but I wouldn't recommend CFAjax. It's outdated, and the guy that wrote it has moved on to MXAjax: http://www.indiankey.com/mxajax/ Personally I prefer ajaxCFC: http://ajaxcfc.riaforge.org/

Re: Mixing CF and JavaScript.

2006-11-14 Thread Charlie Griefer
that array. On 11/14/06, Jason T. Slack [EMAIL PROTECTED] wrote: I am on Day 5 with CF and Coming along nicely. I have a question on mixing CF and Javascript. Say I have the following with an onBlur event: input type=textfield name=upc id=upc size=12 maxlength=12 onblur=lookUpUPC

Re: Mixing CF and JavaScript.

2006-11-14 Thread Teddy Payne
another page or service to activate CF enabled templates. This is typically done in AJAX when using JavaScript. You can do this also in Flash with Flex. Teddy On 11/14/06, Jason T. Slack [EMAIL PROTECTED] wrote: I am on Day 5 with CF and Coming along nicely. I have a question on mixing CF

RE: Mixing CF and JavaScript.

2006-11-14 Thread Ray Champagne
on that. -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 14, 2006 1:17 PM To: CF-Talk Subject: RE: Mixing CF and JavaScript. You need to use AJAX. I agree, but I wouldn't recommend CFAjax. It's outdated, and the guy that wrote it has moved on to MXAjax

Re: Mixing CF and JavaScript.

2006-11-14 Thread Charlie Griefer
[mailto:[EMAIL PROTECTED] Sent: Tuesday, November 14, 2006 1:17 PM To: CF-Talk Subject: RE: Mixing CF and JavaScript. You need to use AJAX. I agree, but I wouldn't recommend CFAjax. It's outdated, and the guy that wrote it has moved on to MXAjax: http://www.indiankey.com/mxajax

RE: Mixing CF and JavaScript.

2006-11-14 Thread Munson, Jacob
: Tuesday, November 14, 2006 11:42 AM To: CF-Talk Subject: Re: Mixing CF and JavaScript. yeah, that's why I threw in the mention of AJAX, but really didn't pursue that as the solution. He's probably got enough things on his plate at the moment without introducing a new technology :) On 11

Re: Mixing CF and JavaScript.

2006-11-14 Thread Charlie Griefer
imagine it's similar in mxajax. -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 14, 2006 11:42 AM To: CF-Talk Subject: Re: Mixing CF and JavaScript. yeah, that's why I threw in the mention of AJAX, but really didn't pursue

Re: Mixing CF and JavaScript.

2006-11-14 Thread Rick Root
Jake Churchill wrote: Look into CFAjax. Don't look into CFAJAX unless you like outdated code with known security vulnerabilities that isn't being updated/maintained anymore. ajaxCFC or mxajax or any variety of others, but absolutely not cfajax. Rick

RE: Mixing CF and JavaScript.

2006-11-14 Thread Ian Skinner
if he does a query without the WHERE and loops over that query, he can create a JS array easily. Even easier if he uses the cfwddx action=cfml2js ... tag, which will take a CF variable, simple or complex, and turn it into a corresponding JS variable. -- Ian Skinner Web

RE: Mixing CF and JavaScript.

2006-11-14 Thread Ray Champagne
if you're still learning the little things that make CF, well, CF. -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 14, 2006 1:58 PM To: CF-Talk Subject: RE: Mixing CF and JavaScript. Importance: High Charlie and Ray, You can't do what he wants

Re: Mixing CF and JavaScript.

2006-11-14 Thread Charlie Griefer
On 11/14/06, Ian Skinner [EMAIL PROTECTED] wrote: if he does a query without the WHERE and loops over that query, he can create a JS array easily. Even easier if he uses the cfwddx action=cfml2js ... tag, which will take a CF variable, simple or complex, and turn it into a corresponding JS

RE: Mixing CF and JavaScript.

2006-11-14 Thread Ian Skinner
BTW, just to clarify...I wasn't trying to debate over which was easier (the JS array vs AJAX), since easy is a relative term. My point was that it's possible to do without AJAX. And my easy was referring to the creation of the JS array, again not JS array VS AJAX. But I concur that jumping

RE: Mixing CF and JavaScript.

2006-11-14 Thread Munson, Jacob
You can do exactly what he wants by loading the data into a JS array. Then his function would simply look in the array rather than trying to do a query. the cfquery in his function is querying for a specific record based on a value passed to the function. if he does a query without the

Re: Mixing CF and JavaScript.

2006-11-14 Thread Dan Plesse
I reviewed every one's response so far and I did like a single one. I would use a bakery analogy. For example CF is like a cake it gets baked first then the sweet buttery javascript icing goes last. The two don't mix well. To cut the layers you need a fork called AJAX bla bla bla. What you need

Re: Mixing CF and JavaScript.

2006-11-14 Thread Charlie Griefer
I think for a guy who's on day 5...all that analogy is going to do is make him more confused and hungry for cake. On 11/14/06, Dan Plesse [EMAIL PROTECTED] wrote: I reviewed every one's response so far and I did like a single one. I would use a bakery analogy. For example CF is like a cake it

Re: Mixing CF and JavaScript.

2006-11-14 Thread Dan Vega
Im on year 5 and I am hungry for cake! On 11/14/06, Charlie Griefer [EMAIL PROTECTED] wrote: I think for a guy who's on day 5...all that analogy is going to do is make him more confused and hungry for cake. On 11/14/06, Dan Plesse [EMAIL PROTECTED] wrote: I reviewed every one's response so

Re: Mixing CF and JavaScript.

2006-11-14 Thread Jon Clausen
To cake or not to bake, that is the question... Whether 'tis nobler in the kitchen to suffer the slings and arrows of outrageous icing or to bear arms against a sea of debugging - and by opposing, to make a sandwich... - Will Bakespeare -Jon*needs to eat some dinner* On Nov 14, 2006,

Re: Mixing CF and JavaScript.

2006-11-14 Thread Richard Dillman
Heres my .02 Do an iframe with the variable in the Url of the iframe. Do an onblur event on the field to reload the iframe. Put your Query and Display element in the iframe. I say this because if your doing a query on a DB with millions of records an aray might not be a good idea.? I use that