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
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
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
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
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
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
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
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
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
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
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
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
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
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
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

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:
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
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
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
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
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:
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) {
.
}
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
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) {
.
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
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:
: 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
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
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
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
:
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
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
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
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
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
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:
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
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
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
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
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
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
Ravi,
I know you dont 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
)
-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
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
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
, 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
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
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
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
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:
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
.
-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
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
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
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
: 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
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
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
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
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
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
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
] 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
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
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
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
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
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
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
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
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
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
Ive 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
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
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
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
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
*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
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
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
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.
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
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
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
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
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
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®
% 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
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
-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
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
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
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
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
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
Hello
~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps
Archive:
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
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
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
201 - 300 of 1308 matches
Mail list logo