to that.
point taken...but still, even one of those '10 minute pocket reference' type
of books would be nice. the cf docs really are lacking when it comes to
cfscript. a few code samples, a few sample apps, etc...
*i'd* shell out $9.95 for the cfscript pocket reference :)
charlie
Print out the link Michael D. gave you in a very very small font :)
Make that $9.95 check out to Marlon Moyer
charlie griefer wrote:
*i'd* shell out $9.95 for the cfscript pocket reference :)
charlie
--- Ben
-Original Message-
From: Massimo, Tiziana e Federica
, [,sort_order])
would be much more helpful and clear in the quick reference.
:)
rob
-Original Message-
From: charlie griefer [mailto:charlie;griefer.com]
Sent: Tuesday, November 12, 2002 12:30 PM
To: CF-Talk
Subject: Re: cfscript book
Ben Forta writes:
I hate to put it this bluntly
now I am asking all of these questions, is cfscript really that good to
use?
or could I go all day long using cftags and never see much performance
difference
..tony
Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337
To: CF-Talk
Subject: Re: cfscript book
Email me off list with what you want added to this doc and you'll have your
10
minute reference.
http://www.houseoffusion.com/docs/cfscript.htm
I know I need to put in the UDF portion (separate file now) and update it to
CFMX. What else would you like? Email me
LOL... :)
On Tue, 12 Nov 2002, Marlon Moyer wrote:
Print out the link Michael D. gave you in a very very small font :)
Make that $9.95 check out to Marlon Moyer
charlie griefer wrote:
*i'd* shell out $9.95 for the cfscript pocket reference :)
charlie
--- Ben
]
WWW : www.camdenfamily.com/morpheus
Yahoo IM : morpheus
My ally is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: Rob Rohan [mailto:rob;cardinalweb.com]
Sent: Tuesday, November 12, 2002 3:51 PM
To: CF-Talk
Subject: RE: cfscript book
Speaking
griefer wrote:
*i'd* shell out $9.95 for the cfscript pocket reference :)
charlie
--- Ben
-Original Message-
From: Massimo, Tiziana e Federica [mailto:massimo;massimocorner.com]
Sent: Tuesday, November 12, 2002 3:04 PM
To: CF-Talk
Subject: Re: cfscript book
?
Rick
Rick Faircloth,
Prism Productions
-Original Message-
From: S. Isaac Dealey [mailto:info;turnkey.to]
Sent: Tuesday, November 12, 2002 2:55 PM
To: CF-Talk
Subject: Re: cfscript book
What does Fusionscript have to do with cfscript? As near as I can tell
there are no relation
As a general note, this is the 'hand-out' from a presentation that Chris
Graves ( of RapidCF ) gave at a Connecticut CFUG meeting. back when
Connecticut still had CFUGs. The presentation was on, of course, CFScript.
Chris knows his stuff, but last I heard he was off doing Java-oriented
Tony,
Pre CFMX using a block of cfscript to set some variables or perform most
tasks would give you an increase in performance. Now with MX if you
have a block of cfscript and set 10 variables compared to 10 cfset
tags the only difference would be the white space between the cfset
tags.
HTH,
t
If the reason you are looking at CFSCRIPT is performance then don't
bother. Sure you may find subtle differences, but honestly, in the grand
scheme of things it has little impact. Here is some test code I just
wrote, copy and paste it in CFMX and try it - it just does a bunch of
loops and sets
Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337
-Original Message-
From: Fitch, Tyler [mailto:tfitch;isitedesign.com]
Sent: Tuesday, November 12, 2002 4:21 PM
To: CF-Talk
Subject: cfscript performance (was cfscript book)
Tony,
Pre CFMX using a block
I am sure others will jump in here, but as far as I can tell there are
only 2 reasons to use CFSCRIPT:
1) For some operations the syntax is cleaner, for example, if you need
to set 20 CF variables - the simple name=value; syntax is cleaner than
using lots of CFSET tags.
2) If you need to port
now I am asking all of these questions, is cfscript really
that good to
use?
or could I go all day long using cftags and never see much performance
difference
The only reason I sometimes use cfscript is that in certain situations
it is a lot easier to read IMO. Those situations
. :-)
--Ben Doom
Programmer General Lackey
Moonbow Software
: -Original Message-
: From: Tony Weeg [mailto:tony;navtrak.net]
: Sent: Tuesday, November 12, 2002 4:29 PM
: To: CF-Talk
: Subject: RE: cfscript performance (was cfscript book)
:
:
: it certainly helpsthanks for the info
can think of.
-Original Message-
From: Tony Weeg [mailto:tony;navtrak.net]
Sent: Tuesday, November 12, 2002 1:29 PM
To: CF-Talk
Subject: RE: cfscript performance (was cfscript book)
it certainly helpsthanks for the infoalthough
I am sure there will be a flood of opinions
Faircloth,
Prism Productions
-Original Message-
From: S. Isaac Dealey [mailto:info;turnkey.to]
Sent: Tuesday, November 12, 2002 2:55 PM
To: CF-Talk
Subject: Re: cfscript book
What does Fusionscript have to do with cfscript? As
near as I can tell
there are no relation.
I doubt
]
Sent: Tuesday, November 12, 2002 4:39 PM
To: CF-Talk
Subject: RE: cfscript performance (was cfscript book)
I would tend to argue that you should at least know the basics so that
you
can create quick UDFs for things you do often -- that's saved me hours
and
hours of coding time.
They are easy
Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337
-Original Message-
From: Rob Rohan [mailto:rob;cardinalweb.com]
Sent: Tuesday, November 12, 2002 4:43 PM
To: CF-Talk
Subject: RE: cfscript performance (was cfscript
[mailto:tony;navtrak.net]
Sent: Wednesday, 13 November 2002 10:53 a.m.
To: CF-Talk
Subject: RE: cfscript performance (was cfscript book)
but isnt an included file,
with some reusable code in it
just as fast as a UDF? I guess maybe the only
reason not would be the time to access the file
, 2002 4:53 PM
: To: CF-Talk
: Subject: RE: cfscript performance (was cfscript book)
:
:
: but isnt an included file,
: with some reusable code in it
: just as fast as a UDF? I guess maybe the only
: reason not would be the time to access the file
: referenced in the cfinclude tagright
I need to set a bunch of param's in CFMX and I would prefer to do it inside of a
CFSCRIPT block. Is this possible? I tried a UDF on cflib.org but it didn't
work...and I thought there was probably a simpler way anyway.
Thanks
Pete
is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: Pete Ruckelshaus [mailto:cflist;ruckelshaus.com]
Sent: Thursday, October 31, 2002 3:00 PM
To: CF-Talk
Subject: CFMX: CFPARAM possible within CFSCRIPT?
I need to set a bunch of param's in CFMX and I would prefer
Pete,
You could create a UDF, but in-line works ok as well - just a little ugly:
cfscript
IF(NOT IsDefined('somevar'))somevar = 'some value';
// repeat as needed
/cfscript
-Original Message-
From: Pete Ruckelshaus [mailto:cflist;ruckelshaus.com]
Sent: Thursday
:00 PM
To: CF-Talk
Subject: CFMX: CFPARAM possible within CFSCRIPT?
I need to set a bunch of param's in CFMX and I would prefer to do it inside
of a CFSCRIPT block. Is this possible? I tried a UDF on cflib.org but it
didn't work...and I thought there was probably a simpler way anyway.
Thanks
This should work.
cffunction name=param returntype=boolean
cfargument name=varName type=any required=Yes
cfargument name=varValue type=any required=Yes
cfparam name=#varName# default=#varValue#
/cffunction
cfscript
param(foo, bar);
param(moo, cow);
/cfscript
--
jon
Hello All.. I visited CFLib.org today for the first time and stumbled
across a cfscript that calculates the number of days till Christmas..
I'd like to make use of that on a site, but am not familiar with how to
incorporate cfscripts into a page.. Can someone give me a starting
pointer here
, 2002 2:01 PM
: To: CF-Talk
: Subject: new to CFSCRIPT
:
:
: Hello All.. I visited CFLib.org today for the first time and stumbled
: across a cfscript that calculates the number of days till Christmas..
: I'd like to make use of that on a site, but am not familiar with how to
: incorporate cfscripts
With the delay, I am sure you will get this same comment several times, but
in case you don't:
You use cfscript just like any other tag so as a (poor) example:
cfquery name=test datasource=it
SELECT blarg
FROM blargin_tbl
WHERE myblarg = 1
/cfquery
cfoutputWelcome
Simply place your function between cfscript/cfscript tags. Then lower on
the page call it like this: cfoutput#DaysUntilChristmas()#/cfoutput .
You would put a list of attributes between the () if there were any.
Later, you might want to place all your functions in files called function
libraries
It's going to depend a little on how the script works, but at a guess it's
something like
function Days2Xmas(date)
{
...
}
This is probably in a file something like Days2Xmas.udf.
If so, simply cfinclude the file. Then you can treat Days2Xmas like any
other CF function. So, to figure
: I wouldn't recommend using .udf as a file extension -- folks here
: have used
: inc ( which is a windows networking file extension iirc ) and .zml (
: zoned-in markup language ) and it causes problems... I certianly advocate
: descriptive file and directory names, but I'd go for something like:
Many thanks for the tips... pretty easy after all !
-Original Message-
From: Tim Laureska [mailto:hometeam;goeaston.net]
Sent: Wednesday, October 30, 2002 2:01 PM
To: CF-Talk
Subject: new to CFSCRIPT
Hello All.. I visited CFLib.org today for the first time and stumbled
across a cfscript
;moonbow.com]
Sent: Wednesday, October 30, 2002 3:13 PM
To: CF-Talk
Subject: RE: new to CFSCRIPT
: I wouldn't recommend using .udf as a file extension -- folks here
: have used
: inc ( which is a windows networking file extension iirc ) and .zml (
: zoned-in markup language ) and it causes
I agree with the descriptine file names, etc., but what's
wrong with naming
it *.udf?
People could download and view your UDFs. I've even used .cfm extensions
on xml files for that reason. I also have a system in place where any
file with a 3-letter prefix and underscore (e.g.
Message-
: From: Robert Everland [mailto:REverland;dixonusa.com]
: Sent: Wednesday, October 30, 2002 3:22 PM
: To: CF-Talk
: Subject: RE: new to CFSCRIPT
:
:
: Cause you will need to map your webserver to have CF parse .udf
: or I can go
: to your website figure out the name of a file and view
: I wouldn't recommend using .udf as a file extension -- folks here
: have used
: inc ( which is a windows networking file extension iirc ) and .zml (
: zoned-in markup language ) and it causes problems... I certianly
advocate
: descriptive file and directory names, but I'd go for something
/
-Original Message-
From: Matthew Walker [mailto:Matthew;cabbagetree.co.nz]
Sent: Wednesday, October 30, 2002 3:32 PM
To: CF-Talk
Subject: RE: new to CFSCRIPT
I agree with the descriptine file names, etc., but what's
wrong with naming
it *.udf?
People could download and view your
-Original Message-
From: Ben Doom [mailto:bdoom;moonbow.com]
Sent: Wednesday, October 30, 2002 3:13 PM
To: CF-Talk
Subject: RE: new to CFSCRIPT
: I wouldn't recommend using .udf as a file extension -- folks here
: have used
: inc ( which is a windows networking file extension iirc
I agree with the descriptine file names, etc., but what's
wrong with naming
it *.udf?
People could download and view your UDFs. I've even used .cfm extensions
on xml files for that reason. I also have a system in place where any
file with a 3-letter prefix and underscore (e.g.
Or you could just place those files outside of your webroot.
Then you could
name them whatever you want.
Yes of course. I generally use a shared hosting service so don't have
that option available, thus don't even think of it. :-) But I think it's
the best/simplest way if possible.
;cabbagetree.co.nz]
Sent: Wednesday, October 30, 2002 3:32 PM
To: CF-Talk
Subject: RE: new to CFSCRIPT
I agree with the descriptine file names, etc., but what's
wrong with naming
it *.udf?
People could download and view your UDFs. I've even used .cfm extensions
on xml files for that reason. I
Message-
From: Matthew Walker [mailto:Matthew;cabbagetree.co.nz]
Sent: Wednesday, October 30, 2002 4:00 PM
To: CF-Talk
Subject: RE: new to CFSCRIPT
Or you could just place those files outside of your webroot.
Then you could
name them whatever you want.
Yes of course. I generally use
: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
-Original Message-
From: S. Isaac Dealey [mailto:info;turnkey.to]
Sent: Wednesday, October 30, 2002 4:06 PM
To: CF-Talk
Subject: *.udf and application security was RE: new to CFSCRIPT
My only
PROTECTED]
WWW: http://www.evoch.com/
-Original Message-
From: S. Isaac Dealey [mailto:info;turnkey.to]
Sent: Wednesday, October 30, 2002 4:06 PM
To: CF-Talk
Subject: *.udf and application security was RE: new to
CFSCRIPT
My only reason for avoiding this directory structure
Hi
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
So a cfscript version of :
cfcase = a,b,c,d,e
Thanks
Kola
~|
Archives: http://www.houseoffusion.com/cf_lists
- Original Message -
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
---
I don't think this is possible. If you get an error when you try it, that
would confirm things :-) I think it might be to do
: multiple case values in switch statement in cfscript
Hi
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
So a cfscript version of :
cfcase = a,b,c,d,e
Thanks
Kola
cfcase = a,b,c,d,e delimiters=,
-Original Message-
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 9:11 AM
To: CF-Talk
Subject: multiple case values in switch statement in cfscript
Hi
Could anyone tell me if its possible to define multiple case
Don't think it's possible to specify a list like that with cfscript. You would need
five different case statements.
Not sure whether you can do this in cfmx.
Nick Han
[EMAIL PROTECTED] 10/10/02 09:11AM
Hi
Could anyone tell me if its possible to define multiple case statements
In a switch
Kola Oyedeji wrote:
So a cfscript version of :
cfcase = a,b,c,d,e
switch(name) {
case Xander:
case Oz:
case Angel:
{
male=true;
break;
}
case Tara:
case Willow:
case Cordelia:
{
male=false;
break
yes, but not exactly as you hoped...
Keep in mind that when a case evaluates to true, CF will execute EVERYTHING
until it finds a break statement...
so this would do what you want...
cfscript
switch( someVal ){
case a:
case b:
case c:
case d:
case e
Woops! sorry didn't see the in cfscript part.
Guessing...
switch(#variabel#){
case a:
stuff
case b:
otherstuff
case c:
morestuff
break;
case q:
asdfasdf
break
Hi
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
So a cfscript version of :
cfcase = a,b,c,d,e
Yes it is.
CFScript uses standard C/C++/Java/JavaScript syntax for switch/case, so the
cfscript equivalent looks like this:
switch
- Original Message -
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
---
I don't think this is possible. If you get an error when you try it, that
would confirm things :-) I think it might be to do
10, 2002 11:11 AM
To: CF-Talk
Subject: multiple case values in switch statement in cfscript
Hi
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
So a cfscript version of :
cfcase = a,b,c,d,e
Thanks
Kola
One option might be to selectively use your break; command in the switch
statement.
If muliple cases can do the same code try
cfscript
switch (theVar){
case val1:{
setAVar = 'it was case 1';
break
Sir Isaac - I bow to your wisdom. I have never seen it in that context.
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 12:59 PM
To: CF-Talk
Subject: Re: multiple case values in switch statement in cfscript
Hi
Could anyone tell
something similar about cfswitch -- So, how do I cascade my case
statements??? ... :P
And technically, the cfscript syntax gives you more control.
Sir Isaac - I bow to your wisdom. I have never seen it in
that context.
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED
**
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
**
Can anyone see what's wrong with this:
cfscript
see what's wrong with this:
cfscript
If (NOT IsDefined(Form.business_types) AND
(IsDefined(Form.residents)) {
session.ResidentsOnly = yes;
}
Else If (NOT IsDefined(Form.residents)) AND
(IsDefined
Message-
From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 15:55
To: CF-Talk
Subject: error with a piece of cfscript code and I can't see what's
wrong?
**
WESTMINSTER CITY COUNCIL
Please refer
Below is the corrected code, you had a few extra (s in front of your
isdefined
cfscript
If (NOT IsDefined(Form.business_types) AND IsDefined(Form.residents))
{
session.ResidentsOnly = yes;
}
Else If (NOT IsDefined(Form.residents) AND
IsDefined(Form.business_type
.
-Original Message-
From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 10:55 AM
To: CF-Talk
Subject: error with a piece of cfscript code and I can't see what's
wrong?
**
WESTMINSTER CITY
: Can anyone see what's wrong with this:
:
: cfscript
: If (NOT IsDefined(Form.business_types) AND
: (IsDefined(Form.residents)) {
: session.ResidentsOnly = yes;
: }
On the next line, you're closing the if clause
15:55
To: CF-Talk
Subject: error with a piece of cfscript code and I can't see what's
wrong?
**
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
Comment inline:
cfscript
If (NOT IsDefined(Form.business_types) AND IsDefined(Form.residents)) {
// ( removed
session.ResidentsOnly = yes;
// Don't you need quotes around this yes?
}
Else {
If (NOT IsDefined(Form.residents)) AND
(IsDefined(Form.business_type)) {
// ( removed
F. Hogan [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 16:02
To: CF-Talk
Subject: RE: error with a piece of cfscript code and I can't see what's
wrong?
Below is the corrected code, you had a few extra (s in front of your
isdefined
cfscript
If (NOT IsDefined(Form.business_types
;
**
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
**
Can anyone see what's wrong with this:
cfscript
If (NOT IsDefined
Is there anyway to have Cfscript open an JS alert box for me???
Kris Pilles
Website Manager
Western Suffolk BOCES
507 Deer Park Rd., Building C
Phone: 631-549-4900 x 267
E-mail: [EMAIL PROTECTED]
__
Structure your ColdFusion
cfscript
documentwrite(script language=javascriptalert('message!');/script);
/cfscript
That should work, shouldn't it?
--Ben Doom
Programmer General Lackey
Moonbow Software
: -Original Message-
: From: Kris Pilles [mailto:[EMAIL PROTECTED]]
: Sent: Thursday
, 2002, 10:25:40 AM, you wrote:
KP Is there anyway to have Cfscript open an JS alert box for me???
KP Kris Pilles
KP Website Manager
KP Western Suffolk BOCES
KP 507 Deer Park Rd., Building C
KP Phone: 631-549-4900 x 267
KP E-mail: [EMAIL PROTECTED]
KP
- Original Message -
From: Kris Pilles [EMAIL PROTECTED]
Is there anyway to have Cfscript open an JS alert box for me???
---
CFSCRIPT is server-side, JS alert boxes pop up client-side.
What are you trying to do? Do you mean you you want to write out some JS
pop
Kris -
Well, you can have CFScript write the javascript that will do
this. However, do not get the two confused. CFScript is still server side
scripting.
script language=javascript
cfscript
writeOutput(alert('hello world'));
/cfscript
/script
Mike Wokasch
UW-Extension
At 10:25 AM 9
No. CFSCRIPT runs exclusively on the server-side and is incapable of
interacting directly with the browser.
You could have CFSCRIPT set the text for the alert box, and output it
yourself like so:
cfscript
alert = 'hello there!';
/cfscript
script language=javascript
alert('cfoutput#alert
if (yourcondition is met) {
alertmessage = 'script language=Javascript';
alertmessage = alertmessagechr(10)'alert(Your alert here)';
alertmessage = alertmessagechr(10)'/script';
}
Then outside your cfscript do this :
cfif IsDefined(alertmessage)
cfhtmlhead text=#alertmessage
THANKS~!
-Original Message-
From: Gyrus [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 10:49 AM
To: CF-Talk
Subject: Re: JS within CFscript
- Original Message -
From: Kris Pilles [EMAIL PROTECTED]
Is there anyway to have Cfscript open an JS alert box for me
Here's a method using a UDF... Mike's comments still hold, but this would
create a shorthand way for you to do it whether or not the cfscript block
is inside a javascript script block or not.
cfscript
function jsalert(message, createscriptblock) {
if (createscriptblock) { writeoutput
cfscript
documentwrite(script
language=javascriptalert('message!');/script);
/cfscript
That should work, shouldn't it?
Got your js and cf functions confused there... and you didn't escape your
double-quotes. :)
cfscript
writeoutput(script language=javascriptalert
if (yourcondition is met) {
alertmessage = 'script language=Javascript';
alertmessage = alertmessagechr(10)'alert(Your alert here)';
alertmessage = alertmessagechr(10)'/script';
}
Then outside your cfscript do this :
cfif IsDefined(alertmessage)
cfhtmlhead text
**
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
**
Hi,
Can anyone tell me which CFML tags are available in CFSCRIPT. I know
www.houseoffusion.com/docs/cfscript.htm
This is complete for CF5 other than UDFs. No CF tags can be used in CFSCRIPT and the
functionality that does exist is limited to 'basic' syntax. CFMX has more to it
including try/catch and the ability to access CFCs.
Hi,
Can anyone tell me which
You can't call any tags inside of cfscript, only functions. The only tag
that also has a function equivalent is cfobject.
Robert Everland III
Web Developer Extraordinaire
Dixon Ticonderoga Company
http://www.dixonusa.com
-Original Message-
From: Adams, Stephen [mailto:[EMAIL PROTECTED
Check this out
http://www.macromedia.com/desdev/mx/coldfusion/extreme/cftags_cfscript.html
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 9:36 AM
To: CF-Talk
Subject: Re: CFML tags available in CFSCRIPT
www.houseoffusion.com/docs
You can't use tags within cfscript.
You can fake it by making a UDF version of the tag in CFMX.
For example, I wrote a UDF called dump. This allows me to do
cfscript
dump(foo);
/cfscript
So basically I've just added a wrapper for the tag.
But - to be anal
ColdFusion Tags in CFScript, and he runs a query and dumps the results from
within CFScript. I thought this is a great idea and something I'd like to
do in CF5 to split my page processing from the html. e.g.
cfscript
// do all the cf stuff here separately from html
/cfscript
cfoutput
: cfjedimaster
My ally is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 9:44 AM
To: CF-Talk
Subject: RE: CFML tags available in CFSCRIPT
At 09:31 AM 9/17/2002 -0400, you wrote:
You can't call any tags inside of cfscript, only functions. The only tag
that also has a function equivalent is cfobject.
I think your statement might be confusing to some people. It is true
that cfobject is one of the few tags (iif comes to mind
Oh, the reason I asked was I have just read Kevin Towes' article Using
ColdFusion Tags in CFScript, and he runs a query and dumps the results
from
within CFScript. I thought this is a great idea and something I'd like to
do in CF5 to split my page processing from the html. e.g.
cfscript
Its a little annoying that you can't use cfinclude
inside cfscript, otherwise I think I would be totally
away from ye olde cfset etc. :o)
You can, in CF MX:
cfscript
getPageContext().include(somefile.cfm);
/cfscript
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202
and cfoutput ... writeOutput() ... although this could arguably be
considered not quite the same thing as cfoutput since it allows you to
output literal values where they aren't otherwise displayed ( within
cfscript ) and doesn't have any inherent looping ability.
You can't call any tags inside
I am having some trouble with some of my javascript
Well my code works within
script/script tages
But when I put them in Cfscript/cfscript tags it doesn't here is the
code:
A couple functions I use throughouit my app::
cfscript
alert(Invalid SSN
Chris, cfscript has some syntax like java script, but it is not a client
side lang like java script.
I thought that the syntax between javascript and cfscript was pretty
much interchangeable?? This is false.
CF server has to parse and return HTML to the browser.
-Original Message-
From
I am having some trouble with some of my javascript
Well my code works within
script/script tages
But when I put them in Cfscript/cfscript tags it doesn't here is the
code:
A couple functions I use throughouit my app::
cfscript
alert(Invalid SSN
The syntax of cfscript is an implementation of the C/C++/Java/JavaScript
syntax ...
the problem you're running into isn't syntactical tho... You're trying to
reference elements of the JavaScript Document Object Model (DOM) on the
ColdFusion ( before the code reaches the browser ) where
cfscript identifies script code that is executed by CF on the server;
script identifies script code that is executed by the browser on the
client; they *look* similar but that are radically different things!
On Wednesday, August 28, 2002, at 12:17 , Kris Pilles wrote:
I am having some
hey,
whats the equivalent to CFTRY for CFSCRIPT,
sounds straightforward,
I've implemented it as you would traditionally,
try {
...do default
catch {...or not}
}
but errors, invalid parser construct etc...
checked the docks, nothing
checked professional cf5.0 nothing
PROTECTED]
Yahoo IM : cfjedimaster
My ally is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: John McCosker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 10:53 AM
To: CF-Talk
Subject: try catch + cfscript
hey,
whats the equivalent to CFTRY
Raymond that would make sense,
respectfully,
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 4:00 PM
To: CF-Talk
Subject: RE: try catch + cfscript
First - it only works in CFMX - secondly - the syntax is:
try {
} catch
901 - 1000 of 1308 matches
Mail list logo