Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Rick Faircloth
$('#input_cfoutput#mls_number#/cfoutput').show()... or var mls_number = cfoutput#mls_number#/cfoutput $('#input_' + mls_number).show()... or ??? Rick ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic

RE: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Andy Matthews
Yes it is. Remember that jQuery code executes after the page is fully loaded in the browser. -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Monday, January 12, 2009 12:47 PM To: cf-talk Subject: Is it possible to use a CF variable in jQuery?

Re: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Charlie Griefer
erm... did you try? :) On Mon, Jan 12, 2009 at 10:46 AM, Rick Faircloth r...@whitestonemedia.comwrote: $('#input_cfoutput#mls_number#/cfoutput').show()... or var mls_number = cfoutput#mls_number#/cfoutput $('#input_' + mls_number).show()... or ??? Rick

Re: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Jason Fisher
Yes, should work just fine. To keep the code clean and safe, you could use jsStringFormat(), too: var mls_input = cfoutput##input_#jsStringFormat(mls_number)#;/cfoutput $(mls_input).show()... ~| Adobe® ColdFusion® 8 software

RE: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Rick Faircloth
Thought I'd ask from the fount of wisdom first, rather than use half-an-hour with trials... :o) -Original Message- From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: Monday, January 12, 2009 1:55 PM To: cf-talk Subject: Re: Is it possible to use a CF variable in jQuery?

RE: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Rick Faircloth
Thanks, Jason, and everyone... Rick -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Monday, January 12, 2009 1:53 PM To: cf-talk Subject: Re: Is it possible to use a CF variable in jQuery? Yes, should work just fine. To keep the code clean and safe, you

Re: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Charlie Griefer
half an hour? really? the time it took to type the code into the e-mail could have been typed into the IDE and run. unless it took you a half hour to compose the e-mail. in which case... my condolences :) On Mon, Jan 12, 2009 at 11:00 AM, Rick Faircloth r...@whitestonemedia.comwrote: Thought

Re: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Tony Bentley
The question to further this discussion is to ask, is it a good idea to mix coldfusion markup and javascript? What is a better approach? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date

RE: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread brad
To me, that's kind of like asking Is it a good idea to use a database in my application? If you need something to happen on the server, then use CF. If you need processing to happen on the client, use JavaScript. If you want the JavaScript to be dependent on the outcome of CF code, then you

Re: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Gerald Guido
is it a good idea to mix coldfusion markup and javascript? Try doing it with PHP or mixing and escaping it with another C-ish/ECMA type language... say cfscript. The goggles... they do NOTHING G! On Mon, Jan 12, 2009 at 5:41 PM, Tony Bentley t...@tonybentley.com wrote: The question

Re: Is it possible to use a CF variable in jQuery?

2009-01-12 Thread Shannon Peevey
I found that you need to include javascript w cf variables in the .cfm file, and not a .js file (for obvious reasons). Speeves On 1/12/09, Gerald Guido gerald.gu...@gmail.com wrote: is it a good idea to mix coldfusion markup and javascript? Try doing it with PHP or mixing and escaping it