Re: cfscript question

2008-08-26 Thread Scott Stewart
the string at the end of the function. I'm not really sure where you are going with this though. If I am writing code that is outputting HTML etc, I usually do it in tags because that is what makes the most sense. I generally reserve cfscript for logic that doesn't involve output. ~Brad

RE: cfscript question

2008-08-26 Thread Dave Watts
Is it possible to do a query output loop in cfscript using something other than WriteOutput? The only way to write any output directly from CFSCRIPT is to use WriteOutput. You can, of course, invoke functions written in CFML from CFSCRIPT. Dave Watts, CTO, Fig Leaf Software http

Re: cfscript question

2008-08-26 Thread Scott Stewart
Watts wrote: Is it possible to do a query output loop in cfscript using something other than WriteOutput? The only way to write any output directly from CFSCRIPT is to use WriteOutput. You can, of course, invoke functions written in CFML from CFSCRIPT. Dave Watts, CTO, Fig Leaf Software

Re: cfscript question

2008-08-26 Thread Yuliang Ruan
yea but...function calls shouldn't have dynamic number of arguments. perhaps u mean to create a list of arguments and pass it in as 1 argument? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to

RE: cfscript question

2008-08-26 Thread Dave Watts
yea but...function calls shouldn't have dynamic number of arguments. Why not? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern

RE: cfscript question

2008-08-26 Thread Dave Watts
I'm trying to populate a function call, by looping over the record count of a query What you have looks fine to me. What's the problem, exactly? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our

Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Larry Lyons
I had originally posted this on CF-Community, but I thought that these results were interesting enough that others would like to see them. I got into a discussion at my new job about creating variables by the cfset tag or via a variable assignment using cfscript. The consensus has been

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Stephane Vantroyen
You should read this, quite interesting (CF8 vs CF7 etc) : http://neilmiddleton.com/2007/07/01/cf-8-and-performance-comparisons/ Regards, Stephane ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Dominic Watson
I ran your code a few times on my machine (XP Pro) and got varying results; sometimes the cfscript was faster, sometimes cfset. Try this code out instead, it performs a single test on both cfscript and cfset for each iteration and records a tally of the time taken for each - this spreads the test

RE: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Dave Watts
I had originally posted this on CF-Community, but I thought that these results were interesting enough that others would like to see them. I got into a discussion at my new job about creating variables by the cfset tag or via a variable assignment using cfscript. I really hate

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Claude Schneegans
Note that 1º according to the docs, GetTickCount() returns a string representation of the system time, not the time spent on the CF code. The CF server is running in a time shared environment, so the system time is not really representative of the execution time. 2º There is a huge difference

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Pete Jordan
Stephane Vantroyen wrote: You should read this, quite interesting (CF8 vs CF7 etc) : http://neilmiddleton.com/2007/07/01/cf-8-and-performance-comparisons/ My guess is that a lot (most?) of the runtime difference between CF7 and 8 is down to the JVM; Java 6 is faster than 5 and a *lot* faster

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Larry Lyons
I had originally posted this on CF-Community, but I thought that these results were interesting enough that others would like to see them. I got into a discussion at my new job about creating variables by the cfset tag or via a variable assignment using cfscript. I really hate

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Larry Lyons
thanks dominic, I ran your code and the results between setting variable blocks with cfscript or using cfset varied from trial to trial. Some times cfscript was faster, other times cfset. Anyhow in a nutshell it confirms my initial idea, that it isn't really a major issue. In the end

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Dominic Watson
with cfscript or using cfset varied from trial to trial. Some times cfscript was faster, other times cfset. Anyhow in a nutshell it confirms my initial idea, that it isn't really a major issue. In the end it depends on personal style, readability and other user factors as to which

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Bryan Stevenson
 btw the answer is 42. Nopethat's the answer to life, the universe, and everything ;-) - Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web:

debugging in cfscript

2008-05-20 Thread Richard White
hi, when debugging with coldfusion tags i use the cfoutput and cfdump tags alot but how can i use these tags and the cfabort tag within cfscript, or how can i get the same effect as these tags? thanks richard ~| Adobe

Re: debugging in cfscript

2008-05-20 Thread Aaron Rouse
Depending on where you are in the script it could be as simple as ending the cfscript then putting in a cfdump and then beginning the cfscript again. I often debug small problems within cfscripts by using writeoutput functions for the values on if statements and other things of that nature. I

Re: debugging in cfscript

2008-05-20 Thread Charlie Griefer
cffunction name=cf_abort output=false returntype=void cfabort / /cffunction cffunction name=cf_dump output=false returntype=void cfargument name=objToDump type=any required=false default= / cfdump var=#arguments.objToDump# / /cffunction cfscript var myArray = newArray(1

Re: debugging in cfscript

2008-05-20 Thread Dominic Watson
when debugging with coldfusion tags i use the cfoutput and cfdump tags alot but how can i use these tags and the cfabort tag within cfscript, or how can i get the same effect as these tags? A common practice is to create a udf that wraps the functionality of a cf tag, so: cffunction name

Re: debugging in cfscript

2008-05-20 Thread Richard White
thanks guys, very neat solution :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive:

cfscript loop versus cfloop

2008-04-15 Thread Jason Durham
I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? cfloop from=1 to=#qNav.recordCount# index=I /cfloop for (; i LTE qNav.recordCount; i=i+1) { . }

Re: cfscript loop versus cfloop

2008-04-15 Thread Dominic Watson
I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? Not quite, the cfscript loop should look like this: for (i=1; i LTE qNav.recordCount; i=i+1) { . } Dominic -- Blog it up: http

Re: cfscript loop versus cfloop

2008-04-15 Thread Patrick Santora
you need to declare i via the script approach. cfloop does a basic declaration for you. the for loop does not. NOTE: if this loop is within a cffunction then ensure you have scoped i correctly (place var i = 1 above the loop) or (i = 1; i LTE qNav.recordCount; i=i+1) { .

RE: cfscript loop versus cfloop

2008-04-15 Thread Jason Durham
and they appear identical. -Original Message- From: Patrick Santora [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 8:18 AM To: CF-Talk Subject: Re: cfscript loop versus cfloop you need to declare i via the script approach. cfloop does a basic declaration for you. the for loop does

Re: cfscript loop versus cfloop

2008-04-15 Thread Dominic Watson
The version with cfloop is the one that's giving me trouble. Is that an 'L' for the cfloop index or an uppercase 'i'? Other than that I'd say we'd need to see more (nothing wrong with the cfloop or scripted loop if i is set before it). Dominic -- Blog it up:

Re: cfscript loop versus cfloop

2008-04-15 Thread Patrick Santora
: cfscript loop versus cfloop you need to declare i via the script approach. cfloop does a basic declaration for you. the for loop does not. NOTE: if this loop is within a cffunction then ensure you have scoped i correctly (place var i = 1 above the loop) or (i = 1; i LTE qNav.recordCount; i

RE: cfscript loop versus cfloop

2008-04-15 Thread Bobby Hartsfield
To: CF-Talk Subject: cfscript loop versus cfloop I'm having a hard time tracking down the source of an error I'm receiving from a recursive function. Are these loops identical? cfloop from=1 to=#qNav.recordCount# index=I /cfloop for (; i LTE qNav.recordCount; i=i+1

Re: cfscript loop versus cfloop

2008-04-15 Thread Richard White
just an observation but the index in the cfloop doesnt look like an 'i' my eyes may be playing me up though!!! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: cfscript loop versus cfloop

2008-04-15 Thread Patrick Santora
I thought that too, but after copying the code from the thread and pasting it into my local environment showed it is being a capital i. On Tue, Apr 15, 2008 at 6:32 AM, Richard White [EMAIL PROTECTED] wrote: just an observation but the index in the cfloop doesnt look like an 'i' my eyes may

Re: cfscript loop versus cfloop

2008-04-15 Thread Patrick Santora
: The variable used in the cfloop is an i, Outlook changed the case of it automagically. Here is a copy of the function using cfscript syntax that works flawlessly (written by Matt Quackenbush)... http://cfm.pastebin.com/d7595c18e Here is a copy of my re-write using cfloop... http://cfm.pastebin.com

RE: cfscript loop versus cfloop

2008-04-15 Thread Jason Durham
I'll have to check again to be 100% sure, but I believe the value is . -Original Message- From: Patrick Santora [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 8:45 AM To: CF-Talk Subject: Re: cfscript loop versus cfloop I would check to see what the argument value for CHILDID

Re: cfscript loop versus cfloop

2008-04-15 Thread Dominic Watson
Could it be that qNav is not var scoped? i.e. cfset qNav = getSubs(ARGUMENTS.ParentID) / If this a recursive function, that should break it. Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8

RE: cfscript loop versus cfloop

2008-04-15 Thread Jason Durham
That was it!! Thanks a bunch! -Original Message- From: Dominic Watson [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 8:50 AM To: CF-Talk Subject: Re: cfscript loop versus cfloop Could it be that qNav is not var scoped? i.e. cfset qNav = getSubs(ARGUMENTS.ParentID

Re: cfscript loop versus cfloop

2008-04-15 Thread Dominic Watson
That was it!! Thanks a bunch! Hoorah! No worries ;) D -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: cfscript loop versus cfloop

2008-04-15 Thread Patrick Santora
Oh good catch Dominic! On Tue, Apr 15, 2008 at 6:50 AM, Dominic Watson [EMAIL PROTECTED] wrote: Could it be that qNav is not var scoped? i.e. cfset qNav = getSubs(ARGUMENTS.ParentID) / If this a recursive function, that should break it. Dominic -- Blog it up:

RE: cfscript loop versus cfloop

2008-04-15 Thread Jason Durham
The variable used in the cfloop is an i, Outlook changed the case of it automagically. Here is a copy of the function using cfscript syntax that works flawlessly (written by Matt Quackenbush)... http://cfm.pastebin.com/d7595c18e Here is a copy of my re-write using cfloop... http

Re: cfscript loop versus cfloop

2008-04-15 Thread Richard White
didnt think of doing that :) I thought that too, but after copying the code from the thread and pasting it into my local environment showed it is being a capital i. On Tue, Apr 15, 2008 at 6:32 AM, Richard White [EMAIL PROTECTED] wrote: just an observation but the index in the cfloop doesnt

RE: cfscript loop versus cfloop

2008-04-15 Thread Jason Durham
Subject: Re: cfscript loop versus cfloop Oh good catch Dominic! On Tue, Apr 15, 2008 at 6:50 AM, Dominic Watson [EMAIL PROTECTED] wrote: Could it be that qNav is not var scoped? i.e. cfset qNav = getSubs(ARGUMENTS.ParentID) / If this a recursive function, that should break it. Dominic

Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
this with cfswitchcfcase but when I switched it over to a cfscript block I started getting errors. Can anyone tell me where I made a mistake? Before anyone asks...yes...I am sticking with CFSCRIPT. CODE: cfoutput cfscript switch(cgi.http_host) { case 'www.brightWebWorks.com':cflocation(theURL

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
Scott, You made an excellent observation about CFScript. It does process faster because it reads a whole block instead of reading tag by tag. Well, the code doesn't work because it says that the cflocation is an undefined variable. I have searched Google to find out how to use CFTags

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
Variable CFLOCATION is undefined. The error occurred in C:\Websites\156945dm2\index.cfm: line 4 2 : cfscript 3 : switch(cgi.http_host) { 4 : case 'www.brightWebWorks.com':cflocation(theURL:'brightWebWorks.com/'); break; 5 : 6 : } On Mon, Apr 14, 2008 at 9:13 AM, [STS] Ravi Gehlot [EMAIL

RE: Using tags with CFSCRIPT

2008-04-14 Thread Scott Stewart
Ravi, I know you don’t have to surround CFScript tags with CFOutput tags. What errors are you getting. I've used a similar script with HMS hosting. Using CFScript should be a bit faster as CF processes the CFScript block all at once as opposed to processing each tag individually. sas

RE: Using tags with CFSCRIPT

2008-04-14 Thread Scott Stewart
) -Original Message- From: [STS] Ravi Gehlot [mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2008 9:29 AM To: CF-Talk Subject: Re: Using tags with CFSCRIPT Variable CFLOCATION is undefined. The error occurred in C:\Websites\156945dm2\index.cfm: line 4 2 : cfscript 3 : switch

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
PROTECTED] Sent: Monday, April 14, 2008 9:29 AM To: CF-Talk Subject: Re: Using tags with CFSCRIPT Variable CFLOCATION is undefined. The error occurred in C:\Websites\156945dm2\index.cfm: line 4 2 : cfscript 3 : switch(cgi.http_host) { 4 : case 'www.brightWebWorks.com':cflocation(theURL

Re: Using tags with CFSCRIPT

2008-04-14 Thread Dominic Watson
Yes, this is the problem: cflocation(theURL:'brightWebWorks.com/') cflocation is a tag, not a function. To do the cflocation from within a cfscript block you will need to create a UDF. I.e. cffunction name=scriptLocation cfargument name=location cfargument name=addToken required=false

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
, not a function. To do the cflocation from within a cfscript block you will need to create a UDF. I.e. cffunction name=scriptLocation cfargument name=location cfargument name=addToken required=false default=false cflocation url=#arguments.location# addtoken=#arguments.addtoken# /cffunction

Re: Using tags with CFSCRIPT

2008-04-14 Thread Dominic Watson
Where would I place these UDFs so that whenever I needed them I could just call the function? Yeh, I often use UDFs for this kind of thing where I want to use cfscript but there is the odd tag I need to use but I doubt you'd ever get a google result for this kind of thing. For UDFs, I

Re: Using tags with CFSCRIPT

2008-04-14 Thread Scott Brady
On Mon, Apr 14, 2008 at 7:09 AM, Scott Stewart [EMAIL PROTECTED] wrote: I've used a similar script with HMS hosting. Using CFScript should be a bit faster as CF processes the CFScript block all at once as opposed to processing each tag individually. I was under the impression

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
often use UDFs for this kind of thing where I want to use cfscript but there is the odd tag I need to use but I doubt you'd ever get a google result for this kind of thing. For UDFs, I usually create a folder in my project called '_udfs' and have a single cfm file for each udf. Then, in the page

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
Thanks. This issue is now resolved. Ravi. On Mon, Apr 14, 2008 at 10:35 AM, Dominic Watson [EMAIL PROTECTED] wrote: Gotcha, would it be better to put these UDFs in CFCs and then instantiate them on Application.CFC? I don't think so because then you would have to call them with:

Re: Using tags with CFSCRIPT

2008-04-14 Thread Raymond Camden
to host all my sites with the CF+ Builder package. My question is...I was about to achieve this with cfswitchcfcase but when I switched it over to a cfscript block I started getting errors. Can anyone tell me where I made a mistake? Before anyone asks...yes...I am sticking with CFSCRIPT

RE: Using tags with CFSCRIPT

2008-04-14 Thread Andy Matthews
. -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2008 9:39 AM To: CF-Talk Subject: Re: Using tags with CFSCRIPT So forgive me for focusing on the non-technical aspect of this - but did I read you right? You are publicly admitting you are cheating

RE: Using tags with CFSCRIPT

2008-04-14 Thread Scott Stewart
with CFSCRIPT So forgive me for focusing on the non-technical aspect of this - but did I read you right? You are publicly admitting you are cheating HostMySite? I must be wrong.Unless perhaps HMS did something to you that you feel justified in cheating them - even then I'd find it hard to believe

Re: Using tags with CFSCRIPT

2008-04-14 Thread Ian Skinner
Raymond Camden wrote: So forgive me for focusing on the non-technical aspect of this - but did I read you right? You are publicly admitting you are cheating HostMySite? I must be wrong.Unless perhaps HMS did something to you that you feel justified in cheating them - even then I'd find it hard

Re: Using tags with CFSCRIPT

2008-04-14 Thread Dominic Watson
Gotcha, would it be better to put these UDFs in CFCs and then instantiate them on Application.CFC? I don't think so because then you would have to call them with: myUDFsObject.udfName() As opposed to just: udfName() You could just include all your udfs in application.cfc in

RE: Using tags with CFSCRIPT

2008-04-14 Thread Andy Matthews
: Using tags with CFSCRIPT Raymond Camden wrote: So forgive me for focusing on the non-technical aspect of this - but did I read you right? You are publicly admitting you are cheating HostMySite? I must be wrong.Unless perhaps HMS did something to you that you feel justified in cheating them

Re: Using tags with CFSCRIPT

2008-04-14 Thread Jamie Price
That's assinine. If they provide a workaround for their customers, why not just build it in to their system and officially allow multiple domains? Silliness. We allow code-based redirects because they're less likely to be implemented (you have to be somewhat familiar with coding) and they

RE: Using tags with CFSCRIPT

2008-04-14 Thread Dave Watts
Using CFScript should be a bit faster as CF processes the CFScript block all at once as opposed to processing each tag individually. I strongly doubt this, and have seen no evidence (load tests) that it's true now, even if it may have been true in the past (which I also doubt). Dave Watts

RE: Using tags with CFSCRIPT

2008-04-14 Thread Dave Watts
You made an excellent observation about CFScript. It does process faster because it reads a whole block instead of reading tag by tag. Have you validated this assumption with load testing? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google

RE: Using tags with CFSCRIPT

2008-04-14 Thread Scott Stewart
Use cfscript Instead of Three or More cfsets The reason is this: When you use cfscript, the entire block gets sent to the engine at once. So, ColdFusion has to make only one read. When you send three or more cfset statements, ColdFusion gets to interpret them once each, or three times. Therefore

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
with IIS validating hostnames. In my case, it doesn't validade letting me use different domains. Weird. Any insights? Ravi. On Mon, Apr 14, 2008 at 12:59 PM, Scott Stewart [EMAIL PROTECTED] wrote: Use cfscript Instead of Three or More cfsets The reason is this: When you use cfscript, the entire

Re: Using tags with CFSCRIPT

2008-04-14 Thread [STS] Ravi Gehlot
Hey Scott, I spoke to a couple of my senior developer friends and they told me that back in the days of CF5 cfscript was faster than tags but that doesn't hold true with CF7 and 8 so it doesn't really matter. I prefer to code in cfscript/cfscript blocks when I do imports...just my way

RE: Using tags with CFSCRIPT

2008-04-14 Thread Scott Stewart
] Ravi Gehlot [mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2008 1:58 PM To: CF-Talk Subject: Re: Using tags with CFSCRIPT Hey Scott, I spoke to a couple of my senior developer friends and they told me that back in the days of CF5 cfscript was faster than tags but that doesn't hold true

RE: Using tags with CFSCRIPT

2008-04-14 Thread Eric Roberts
Then they would have to support it ;-) Eric /*-Original Message- /*From: Andy Matthews [mailto:[EMAIL PROTECTED] /*Sent: Monday, April 14, 2008 10:05 AM /*To: CF-Talk /*Subject: RE: Using tags with CFSCRIPT /* /*That's assinine. If they provide a workaround for their customers, why

RE: Using tags with CFSCRIPT

2008-04-14 Thread Dave Watts
Use cfscript Instead of Three or More cfsets The reason is this: When you use cfscript, the entire block gets sent to the engine at once. So, ColdFusion has to make only one read. When you send three or more cfset statements, ColdFusion gets to interpret them once each, or three times

CFScript compedium

2008-03-24 Thread Scott Stewart
Hey all, Is there a comprehensive CFScript compendium anywhere? Thanks sas -- Scott Stewart ColdFusion Developer SSTWebworks 4405 Oakshyre Way Raleigh, NC. 27616 (919) 874-6229 (home) (703) 220-2835 (cell) No virus found in this outgoing message. Checked by AVG

Re: CFScript compedium

2008-03-24 Thread Casey Dougall
On Mon, Mar 24, 2008 at 11:01 AM, Scott Stewart [EMAIL PROTECTED] wrote: Hey all, Is there a comprehensive CFScript compendium anywhere? Only one I know of is the Cheat Sheet. http://www.petefreitag.com/cheatsheets/coldfusion/cfscript/ Casey

Re: CFScript compedium

2008-03-24 Thread Charlie Griefer
On Mon, Mar 24, 2008 at 8:01 AM, Scott Stewart [EMAIL PROTECTED] wrote: Hey all, Is there a comprehensive CFScript compendium anywhere? it's a tad old, but it still works (the notable exception being the new operators in CF8 not being there)... http://www.houseoffusion.com/tutorials/cfscript

Re: CFScript compedium

2008-03-24 Thread Gerald Guido
not suggesting this is a best practice by any means... was just me trying to jump into cfscript with both feet. calendar sample and code are at http://charlie.griefer.com/code/cf/cfscript_calendar.cfm. this Huh, that looks a lot like PHP. Charlie points out reason # 432 why I use CF. Write

Re: CFScript compedium

2008-03-24 Thread Michael Dinowitz
I'll update it asap. On Mon, Mar 24, 2008 at 11:35 AM, Charlie Griefer [EMAIL PROTECTED] wrote: On Mon, Mar 24, 2008 at 8:01 AM, Scott Stewart [EMAIL PROTECTED] wrote: Hey all, Is there a comprehensive CFScript compendium anywhere? it's a tad old, but it still works (the notable

Converting a CFSCRIPT function to a CFFUNCTION function

2008-03-04 Thread Don
Have a requirement to convert a function written with CFFUNCTION format into CFSCRIPT function format. Is there anything around that can automate this process? ~| Adobe® ColdFusion® 8 software 8 is the most important

RE: Converting a CFSCRIPT function to a CFFUNCTION function

2008-03-04 Thread Dave Watts
Have a requirement to convert a function written with CFFUNCTION format into CFSCRIPT function format. Is there anything around that can automate this process? No, but if it's a single function it shouldn't take too long. However, CFSCRIPT doesn't support everything that CFFUNCTION can do

stupid cfscript/javascript question

2008-02-06 Thread Scott Stewart
I’ve completely forgotten how to do this…. I have this script cfscript function show_new(dt) { if(DateDiff(d,dt,Now()) LT 30) { return 'font color=redNew!/font'; }; return ''; } /cfscript I need to call it inside a li tag

RE: stupid cfscript/javascript question

2008-02-06 Thread Dave Watts
I have this script cfscript function show_new(dt) ... I need to call it inside a li tag li style=list-style-type:square; margin-left:-18px; margin-right: 8px; li ...cfoutput#show_new(your_date_variable)#/cfoutput/li Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com

RE: stupid cfscript/javascript question

2008-02-06 Thread Adrian Lynch
Call it inline liMy list itemscript type=text/javascriptmyFunctionCall();/script/li Nothing to do with your problem, but check out jQuery if you want an easier life with JS. Adrian -Original Message- From: Scott Stewart Sent: 06 February 2008 16:43 To: CF-Talk Subject: stupid cfscript

RE: stupid cfscript/javascript question

2008-02-06 Thread Andy Matthews
li#show_new(value)#/li -Original Message- From: Scott Stewart [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 10:43 AM To: CF-Talk Subject: stupid cfscript/javascript question I've completely forgotten how to do this.. I have this script cfscript function show_new(dt

Re: stupid cfscript/javascript question

2008-02-06 Thread gary gilbert
li style=list-style-type:square; margin-left:-18px; margin-right: 8px; cfoutput #show_new(dt)# /cfoutput /li -- Gary Gilbert http://www.garyrgilbert.com/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and

RE: stupid cfscript/javascript question

2008-02-06 Thread Adrian Lynch
*whistles* I hope no one see my reply :OS *whistles* -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 06 February 2008 16:49 To: CF-Talk Subject: RE: stupid cfscript/javascript question Call it inline liMy list itemscript type=text/javascriptmyFunctionCall

RE: stupid cfscript/javascript question

2008-02-06 Thread Scott Stewart
To: CF-Talk Subject: RE: stupid cfscript/javascript question li#show_new(value)#/li -Original Message- From: Scott Stewart [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 10:43 AM To: CF-Talk Subject: stupid cfscript/javascript question I've completely forgotten how to do

Re: stupid cfscript/javascript question

2008-02-06 Thread Bruce Sorge
Is that what I smell. I thought the guy in the cube next to me broke wind. :) Bruce Scott Stewart wrote: Thanks all... Sorry for the brain fart ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release

Re: cfscript help using cfloop to name function with cf var - argh!

2008-01-28 Thread Gerald Guido
Also can anyone recommend a good way to troubleshoot Javascript errors? Fire bug for FF https://addons.mozilla.org/en-US/firefox/addon/1843 And debugbar for IE (Free for personal use) http://www.debugbar.com/ On Jan 28, 2008 3:14 PM, [EMAIL PROTECTED] wrote: I've got most of this working.

Re: cfscript help using cfloop to name function with cf var - argh!

2008-01-28 Thread Dominic Watson
A side note; there's no need to maintain that 'COUNT' variable as CF does this for you with the currentRow property of the cfquery object, so: cfloop query=get_cand cfset htmlcontent = htmlcontent#currentRow# !--- or --- cfset showWindow = showWindow#get_cand.currentRow# /cfloop Dominic On

RE: cfscript help using cfloop to name function with cf var - argh!

2008-01-28 Thread William Seiter
I am trying to follow what you are wanting to accomplish with this. You are setting htmlcontent to the string value 'htmlcontent' plus the current 'count' value. Then you are sending the htmlcontent1 variable (which doesn't appear to exist) to the ToScript function? I think htmlcontent1 is part

cfscript help using cfloop to name function with cf var - argh!

2008-01-28 Thread coldfusion . developer
I've got most of this working. I'm just having a hard time getting the cf variables to parse out when naming the javscript function. Everything works fine except when I try and wrap a cf variable around the function name. Any ideas? Thanks. Also can anyone recommend a good way to troubleshoot

Re: cfscript help using cfloop to name function with cf var - argh!

2008-01-28 Thread Dominic Watson
A random guess, but try removing all the cfoutput tags and wrap the whole lot in one cfoutput tag. Perhaps it is a whitespace thing...(?) Dominic I've got most of this working. I'm just having a hard time getting the cf variables to parse out when naming the javscript function. Everything

translate js function to cfscript

2008-01-13 Thread Richard White
Hi, I have a javascript function that i need to translate to cfscript but am having difficulty with finding some of the correct cf methods. the javascript code is as follows: function isDate(dateStr) { var datePat = /^(\d{1,2})(\/)(\d{1,2})(\/)(\d{4})$/; var

Re: translate js function to cfscript

2008-01-13 Thread Richard White
Hi, i have done most of it but the difficulty i am having is, like i said, with the pattern matching and also the line: isleap = (year % 4 eq 0 and (year % 100 neq 0 or year % 400 eq 0)); mainly the % signs thanks ~| Adobe®

Re: translate js function to cfscript

2008-01-13 Thread Charlie Griefer
% is the mod operator in cf. year mod 4 ('year', btw isn't really a good variable name... it's also the name of a built in function. same for day and month). On Jan 13, 2008 11:05 AM, Richard White [EMAIL PROTECTED] wrote: Hi, i have done most of it but the difficulty i am having is, like i

Re: translate js function to cfscript

2008-01-13 Thread Richard White
ok great thanks very much, i will make those changes now: have you ever done pattern matching in cf charlie as that the only other bit now that i am a bit shady on? thanks again ~| Adobe® ColdFusion® 8 software 8 is the most

RE: translate js function to cfscript

2008-01-13 Thread Jim Davis
-Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Sunday, January 13, 2008 2:06 PM To: CF-Talk Subject: Re: translate js function to cfscript Hi, i have done most of it but the difficulty i am having is, like i said, with the pattern matching and also

Re: translate js function to cfscript

2008-01-13 Thread Richard White
lol, Jim - thanks for waking me up. i have been working so hard that i think my brain has gone to sleep :) thanks very much i will use the isDate() function ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic

RE: translate js function to cfscript

2008-01-13 Thread William Seiter
that i need to translate to cfscript but am having difficulty with finding some of the correct cf methods. the javascript code is as follows: function isDate(dateStr) { var datePat = /^(\d{1,2})(\/)(\d{1,2})(\/)(\d{4})$/; var matchArray = dateStr.match(datePat

Re: translate js function to cfscript

2008-01-13 Thread Charlie Griefer
On Jan 13, 2008 12:19 PM, Jim Davis [EMAIL PROTECTED] wrote: Honestly all that pattern matching is doing is attempting to determine if a date has been entered. CF's isDate() function will do the same work but allow a much broader range of entry. isleap = (year % 4 eq 0 and (year % 100 neq 0

Re: translate js function to cfscript

2008-01-13 Thread Richard White
Thanks william, this makes me understand how it was done in the first place now. thanks very much richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

getBreadcrumbs - Help Updating a CFSCRIPT

2007-07-27 Thread Brett H
searched for required=yes type=string / cfargument name=pageName hint=The name of the page (template/script) to be used in building the links; defaults to 'index.cfm' required=no type=string default=index.cfm / cfscript var

getBreadcrumbs - Help Updating a CFSCRIPT

2007-07-26 Thread Brett H
Hello ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive:

cfscript vs. cfml

2007-05-01 Thread Robert Rawlins - Think Blue
Hello Guys, I'd like to get your thoughts on the differences between cfscript and standard cfml tag based code. I've worked using both methods for some time now and feel equally comfortable with them, so this isn't really a question of preference, but the benefits of performance and features

Re: cfscript vs. cfml

2007-05-01 Thread Andrew Scott
Pre MX that was the case, now there is no spped increase in cfscript over cfml anymore. As for preference, I think it is just that now preference. On 5/1/07, Robert Rawlins - Think Blue [EMAIL PROTECTED] wrote: Hello Guys, I'd like to get your thoughts on the differences between cfscript

RE: cfscript vs. cfml

2007-05-01 Thread Ben Nadel
I can't remember where I saw it, but someone actually looked at the compiled code of CFScript vs. the compiles code of Tag based coding. The Cfscript compiles code did this thing where it shut off the white space buffer or something. I can't remember if this resulted in speed difference

<    1   2   3   4   5   6   7   8   9   10   >