cfscript question...

2003-11-06 Thread Che Vilnonis
What am I doing wrong here? cfscript // Intialize List FieldList = CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress ,BillAddress2,BillCity,BillState,BillZip,BillPhone; // Loop thru list and define all FORM variables for(i=1; i LTE listlen(FieldList); i = i + 1

RE: cfscript question...

2003-11-06 Thread Tony Weeg
: Thursday, November 06, 2003 4:26 PM To: CF-Talk Subject: cfscript question... What am I doing wrong here? cfscript // Intialize List FieldList = CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress ,BillAddress2,BillCity,BillState,BillZip,BillPhone; // Loop thru list

RE: cfscript question...

2003-11-06 Thread Raymond Camden
I assume you want to see if form[X] is defined, were X is from fieldList. You are missing a # sign: if(not isDefined(form.#listGetAt(fieldlist,i)#)) form[listGetAt(fieldList,i)] = ; Also note I switched to dot notation for the isDefined check. If you want to use brackets, switch to

RE: cfscript question...

2003-11-06 Thread J E VanOver
What is it not doing right? One thing, isDefined wants a simple string.Try: if (NOT isDefined(FORM[#listgetat(FieldList,i)#])) Jann -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 1:26 PM To: CF-Talk Subject: cfscript question... What

RE: cfscript question...

2003-11-06 Thread Che Vilnonis
Using CF5. The error is... Parameter 1 of function IsDefined which is now FORM[listgetat(FieldList,i)] must be a syntactically valid variable name. -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 4:31 PM To: CF-Talk Subject: RE: cfscript

RE: cfscript question...

2003-11-06 Thread Barney Boisvert
To: CF-Talk Subject: cfscript question... What am I doing wrong here? cfscript // Intialize List FieldList = CustEmail,CustPassword,CustPassword2,BillFirstName,BillLastName,BillAddress ,BillAddress2,BillCity,BillState,BillZip,BillPhone; // Loop thru list and define all FORM variables for(i=1; i

RE: cfscript question...

2003-11-06 Thread Che Vilnonis
that was it Ray... btw, how do you know all of this stuff? you must use more than 10% of your brain :) -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 4:33 PM To: CF-Talk Subject: RE: cfscript question... I assume you want to see

cfscript

2003-10-10 Thread Gabriel Robichaud
Hey out there? Anyone know of a good resource for CFScript... some documentation would be really cool! TIA!! Gabriel [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Re: cfscript

2003-10-10 Thread Charlie Griefer
http://tutorial84.easycfm.com/ also, i put together a calendar in cfscript just for the hell of it... http://charlie.griefer.com/cfscript_calendar.cfm - Original Message - From: Gabriel Robichaud To: CF-Talk Sent: Friday, October 10, 2003 12:24 PM Subject: cfscript Hey out

RE: cfscript

2003-10-10 Thread Owens, Howard
Improving my knowledge of _javascript_ helped me a lot with CFSCRIPT. I would learn how functions work. Learn flow control and conditionals. Remember you can use cf's built-in functions in cfscript. Go to cflib.org and study a bunch of UDFs. H

Re:Dynamic queryname in CFSCRIPT

2003-10-06 Thread Rory Lysaght
Matthew, Thank you - that did the trick.I assumed a string, the name of the query, was what I needed, but it works perfectly without the quotes. function timeRes(x) { myarray = arrayNew(1); myarray[1] = rsEquipAvail0; rCount = myarray[x].RecordCount; // etc. } Oh here's the problem: You are

Re:Dynamic queryname in CFSCRIPT

2003-10-06 Thread Rory Lysaght
That fixed it - thanks. Oh here's the problem: You are placing strings in your array -- rsEquipAvail1 is a string. Try it without the quotes. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Dynamic queryname in CFSCRIPT

2003-10-05 Thread Rory Lysaght
myarray[x].RecordCount; chokes. Here's a simplified version of the script: cfscript function timeRes(x) { myarray = arrayNew(1); myarray[1] = rsEquipAvail1; myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3); rCount = myarray[x].RecordCount; return rCount; } /cfscript [Todays Threads

RE: Dynamic queryname in CFSCRIPT

2003-10-05 Thread Matthew Walker
What happens if you write: myQuery =myarray[x]; rCount = myQuery.recordCount instead of rCount = myarray[x].RecordCount; ? -Original Message- From: Rory Lysaght [mailto:[EMAIL PROTECTED] Sent: Monday, 6 October 2003 10:45 a.m. To: CF-Talk Subject: Dynamic queryname in CFSCRIPT

Re:Dynamic queryname in CFSCRIPT

2003-10-05 Thread Rory Lysaght
What happens if you write: myQuery =myarray[x]; rCount = myQuery.recordCount instead of rCount = myarray[x].RecordCount; Good suggestion, but it generates the same error message on the rCount = myQuery.recordCount; line. [Todays Threads] [This Message] [Subscription] [Fast

RE: Dynamic queryname in CFSCRIPT

2003-10-05 Thread Matthew Walker
Oh here's the problem: You are placing strings in your array -- rsEquipAvail1 is a string. Try it without the quotes. -Original Message- From: Rory Lysaght [mailto:[EMAIL PROTECTED] Sent: Monday, 6 October 2003 10:45 a.m. To: CF-Talk Subject: Dynamic queryname in CFSCRIPT I've got

Re: Dynamic queryname in CFSCRIPT

2003-10-05 Thread Claude Schneegans
I suppose rsEquipAvail1 and rsEquipAvail2 are queries? Then try this rCount = evaluate(myarray[x] .RecordCount); [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: Can I Throw within cfscript???

2003-09-17 Thread Adam Wayne Lehman
Right. This is one of the fundamental reasons you can't use cfscript that much. If you wrap Cfthrow in another function (or use the one Raymond wrote) the error is actually throw from the throw function, not where you called the function. So the error will always show the lines of the throw

RE: Can I Throw within cfscript???

2003-09-17 Thread Bryan F. Hogan
Adam, you can still do a try/catch inside the throw function. By using writeoutput(excp.message); -Original Message- From: Adam Wayne Lehman [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 9:05 AM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Right. This is one

Re: Can I Throw within cfscript???

2003-09-17 Thread Thomas Chiverton
On Wednesday 17 Sep 2003 14:04 pm, Adam Wayne Lehman wrote: Why oh why do we have try/catch but no throw? It's like we got loops without a break command. No point. You can just an an extra looping condition, and change the value of that flag if you need to break out. -- Tom Chiverton (sorry

RE: Can I Throw within cfscript???

2003-09-17 Thread Adam Wayne Lehman
Thanks Tom. There is actually a 'break' command in cfscript, I was just using it as an example to illustrate operators and commands that go hand in hand. Adam Wayne Lehman Web Systems Developer Johns Hopkins Bloomberg School of Public Health Distance Education Division -Original Message

RE: Can I Throw within cfscript???

2003-09-17 Thread Barney Boisvert
You mean loops without a continue command, right? There is a break in both CFML and CFSCRIPT, but continue only in CFSCRIPT. Quite annoying. -Original Message- From: Adam Wayne Lehman [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 6:05 AM To: CF-Talk Subject: RE: Can

Re: Can I Throw within cfscript???

2003-09-17 Thread Sean A Corfield
On Wednesday, Sep 17, 2003, at 08:20 US/Pacific, Adam Wayne Lehman wrote: Thanks Tom. There is actually a 'break' command in cfscript, I was just using it as an example to illustrate operators and commands that go hand in hand. There are a lot of folks who think that using 'break' in a loop

Re:Can I Throw within cfscript???

2003-09-17 Thread Stan Winchester
Andy, I'm not sure this is what you are looking for, but I've done some pretty robust error trapping using this type of logic: cftry cfscript message = ; errors = 0; if ( NOT IsDefined('foo') ) { message = You must define foo; errors = 1; } /cfscript cfif errors EQ 1

Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Do I have to go out of the script language to throw and error or is there a way to do it within cf-script(without separate function call that throws error)? Andy ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4

RE: Can I Throw within cfscript???

2003-09-16 Thread Shawn Grover
You can write a wrapper function for CFTHROW then call that function from within your CFScript block... -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 2:43 PM To: CF-Talk Subject: Can I Throw within cfscript??? Do I have to go out

Re: Can I Throw within cfscript???

2003-09-16 Thread Paul Hastings
You can write a wrapper function for CFTHROW then call that function from within your CFScript block... yes, but you have to manage most of the error details yourself. cfscript really needs a throw(). ~| Archives: http

RE: Can I Throw within cfscript???

2003-09-16 Thread Douglas.Knudsen
no need for wrapper...throw(); http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html for an example doug -Original Message- From: Shawn Grover [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 4:48 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? You can

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
This won't work on my system running under NT MX. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:53 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? no need for wrapper...throw(); http://www.mail-archive.com

RE: Can I Throw within cfscript???

2003-09-16 Thread Raymond Camden
within cfscript??? This won't work on my system running under NT MX. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:53 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? no need for wrapper...throw

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Raymond, CFFunction works, what doesn't is: cfscript throw(type=ValidationError Message=This just wont work); ... Andy -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 4:50 PM To: CF-Talk Subject: RE: Can I Throw

RE: Can I Throw within cfscript???

2003-09-16 Thread Raymond Camden
] Sent: Tuesday, September 16, 2003 4:03 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Raymond, CFFunction works, what doesn't is: cfscript throw(type=ValidationError Message=This just wont work); ... Andy -Original Message- From: Raymond Camden

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Create a complete page with only the following: cfscript throw(message=Test one); /cfscript When you execute it, Variable THROW is undefined is thrown. Andy -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 5:13 PM To: CF-Talk

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
Andy you still have to init your library. -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 7:29 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Create a complete page with only the following: cfscript throw(message

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Huh? -Original Message- From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 6:45 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Andy you still have to init your library. -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
You have to create a reference to the cfc before you can call a function from the cfc in your cfml. Example: Test.cfm cfscript myCFC=CreateObject('component','mycfcfilename'); myCFC.throw(message=I've been thrown to the wall, ouch!); /cfscript -Original Message- From

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
perfectly. Andy -Original Message- From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 7:01 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? You have to create a reference to the cfc before you can call a function from the cfc in your cfml. Example

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
, 2003 7:58 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? OK, now I am totally confused. Please walk me through this... I have a CFC called FOO with a single method called Throw Exception: FOO: Function ThrowException throw(message=Test one); what object am I instantiating

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
I should have read your email more closely. What you want is cffunction name=throwException returntype=string output=false cfscript var throwExceptionReturn=''; throwExceptionReturn=I've been thrown to the wall, ouch!; /cfscript cfreturn

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Correct. Before, I was trying to simplify the problem to what I thought was the root. -Original Message- From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 7:12 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? First do you have a cfc file

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
If your trying to throw within your cfc use Your.cfc cffunction name=throwException returntype=string output=false cfargument name=theString default= required=yes cfscript var throwExceptionReturn=''; throwExceptionReturn=Arguments.theString

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
Throw within cfscript??? If your trying to throw within your cfc use Your.cfc cffunction name=throwException returntype=string output=false cfargument name=theString default= required=yes cfscript var throwExceptionReturn=''; throwExceptionReturn

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
Ok, I need some more information. Please post an example of your cfc and your cfml page -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 9:00 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Not what I am looking to do. I

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
(cfcatch)#/cfoutput /cfcatch /cftry cfscript try { test(); } catch(Any excpt) { writeoutput(brCFCatch Exists - #IsDefined(cfcatch)#); } /cfscript cffunction name=Test cfthrow message=This is a throw error /cffunction

RE: Can I Throw within cfscript???

2003-09-16 Thread Barney Boisvert
You can't. You have to define a throw() function elsewhere that wraps the CFTHROW tag, and include the definition before it's used. But before you go down this road too far, I would be quite surprised if the next version of CF doesn't have a 'throw' keyword in CFSCRIPT. I was utterly shocked

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
Here is the answer cftry !--- This line throws error --- cfset test1() cfcatch type=any cfoutput#test(message=CFCatch Exists - #IsDefined(cfcatch)#)#/cfoutput /cfcatch /cftry br cfscript try { test1(); } catch

Try And Catch work differently then CFTRYCFCATCH (was RE: Can I Throw within cfscript???)

2003-09-16 Thread Andy Ousterhout
)#/cfoutput /cfcatch /cftry cfscript try { test(); } catch(Any excpt) { writeoutput(brCFCatch Exists - #IsDefined(cfcatch)#); } /cfscript cffunction name=Test cfthrow message=This is a throw error /cffunction Andy

RE: Try And Catch work differently then CFTRYCFCATCH (was RE: Can I Throw within cfscript???)

2003-09-16 Thread Bryan F. Hogan
Yes they do. The cfscript version of the try is a custom named type. So in your case excpt is the equiv to cfcatch you do excpt.message in cfscript in cfcatch you use cfcatch.message -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 9:54

RE: Can I Throw within cfscript???

2003-09-16 Thread Andy Ousterhout
within cfscript??? Here is the answer cftry !--- This line throws error --- cfset test1() cfcatch type=any cfoutput#test(message=CFCatch Exists - #IsDefined(cfcatch)#)#/cfoutput /cfcatch /cftry br cfscript try { test1

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
-Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 10:03 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Bryan, This is not the same code. All you are doing is returning from a function call. You are NOT throwing an exception

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
You _have_ to use cfthrow within test to throw within test. -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 10:03 PM To: CF-Talk Subject: RE: Can I Throw within cfscript??? Bryan, This is not the same code. All you are doing

RE: Can I Throw within cfscript???

2003-09-16 Thread Bryan F. Hogan
You can not throw a custom throw within the custom throw, you will have to use cfthrow within your custom throw function -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 10:03 PM To: CF-Talk Subject: RE: Can I Throw within cfscript

RE: Try And Catch work differently then CFTRYCFCATCH (was RE: Can I Throw within cfscript???)

2003-09-16 Thread Andy Ousterhout
cfscript???) Yes they do. The cfscript version of the try is a custom named type. So in your case excpt is the equiv to cfcatch you do excpt.message in cfscript in cfcatch you use cfcatch.message -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003

CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Alexander Sherwood
Anyway to easily emulate CFPARAM using CFSCRIPT (without conditional logic?) -- Alex Sherwood ~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe

RE: CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Pascal Peters
No, but there is a UDF on cflib.org -Original Message- From: Alexander Sherwood [mailto:[EMAIL PROTECTED] Sent: donderdag 11 september 2003 16:30 To: CF-Talk Subject: CFSCRIPT equiv. of CFPARAM? Anyway to easily emulate CFPARAM using CFSCRIPT (without conditional logic?) -- Alex

RE: CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Ben Doom
:30 AM : To: CF-Talk : Subject: CFSCRIPT equiv. of CFPARAM? : : : Anyway to easily emulate CFPARAM using CFSCRIPT (without : conditional logic?) : : -- : Alex Sherwood : : ~| Archives: http://www.houseoffusion.com/lists.cfm

Re: CFSCRIPT equiv. of CFPARAM?

2003-09-11 Thread Neculai Macarie
function cf_param(var_name, default_value) { if(not isDefined(var_name)) SetVariable(var_name, default_value); } mack / - Original Message - From: Alexander Sherwood [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, September 11, 2003 17:29 Subject: CFSCRIPT equiv

CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
I'm redoing my CFSCRIPT docs and one of the things I'm adding in are all the 'extra' things you can do with it in CFMX. One such thing is a CFLOCATION using GetPageContext().forward(somefile.cfm) I believe that there was a CFINCLUDE type code as well, but I can't seem to find it. If anyone

Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Matt Liotta
I'm redoing my CFSCRIPT docs and one of the things I'm adding in are all the 'extra' things you can do with it in CFMX. One such thing is a CFLOCATION using GetPageContext().forward(somefile.cfm) I believe that there was a CFINCLUDE type code as well, but I can't seem to find

RE: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Barney Boisvert
, Senior Development Engineer AudienceCentral [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 3:52 PM To: CF-Talk Subject: CFLINCLUDE in CFSCRIPT

Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
Perfect, thanks. I'll give you credit and a link in the docs to this (as well as Charlie credit for his CFLOCATION portion). Are there any solid docs on the GetPageContext() stuff? I'm redoing my CFSCRIPT docs and one of the things I'm adding in are all the 'extra' things you can do

Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Dave Carabetta
I'm redoing my CFSCRIPT docs and one of the things I'm adding in are all the 'extra' things you can do with it in CFMX. One such thing is a CFLOCATION using GetPageContext().forward(somefile.cfm) I believe that there was a CFINCLUDE type code as well, but I can't seem to find

RE: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Tyler Silcox
() that might parse a variable (that could be read from a file or created on the fly? cfscript // example (quick one) Bob=I love ##BobsGirlfriend##, but this is a pound: ##.; BobsGirlfriend=Jane; GetPageContext().Parse(SomeString); /cfscript Would output: I love Jane, but this is a pound: #. This isn't

Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
Got that already, thanks. Do you know of any other GetPageContext() pieces that are floating around? I only remember those 2. For that matter, I think it's worth pointing out that cflocation and GetPageContext().forward(somefile.cfm) are not exactly the same either. One's a client-side

Re: CFLINCLUDE in CFSCRIPT

2003-09-11 Thread Michael Dinowitz
page (somefile.htm). So it has some internal parse switch to determine whether or not to parse a relative link. Sooo...is there some sub-function within GetPageContext() that might parse a variable (that could be read from a file or created on the fly? cfscript // example (quick one) Bob=I

RE: Quick cfscript if else ?

2003-08-21 Thread Ben Doom
General Lackey Moonbow Software, Inc : -Original Message- : From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] : Sent: Thursday, August 21, 2003 3:51 PM : To: CF-Talk : Subject: Quick cfscript if else ? : : : Not done much if something is this, then set this value... : : How far off am I

RE: Quick cfscript if else ?

2003-08-21 Thread DURETTE, STEVEN J (AIT)
I believe it is: cfscript if(form[qty#k#] IS ) newqty = 0; else newqty = form[qty#k#]; /cfscript Try to avoid the evaluate if possible. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21

Quick cfscript if else ?

2003-08-21 Thread webmaster
Not done much if something is this, then set this value... How far off am I? Not seeing a good tutorial directly related to this... (ignore //) ...in essence looking for a blank value and resetting to 0 or else use the numeric value passed... //if

RE: Quick cfscript if else ?

2003-08-21 Thread Raymond Camden
I think you want cfscript if(form[qty#k#] is ) newqty = 0; else newqty = form[qty#k#]; /cfsciprt === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http

Quick cfscript if else ?

2003-08-21 Thread Mike Mertsock
Raymond and Steven, you are correct by using if(form[qty#k#] is ). When writing CFSCRIPT code, you use the same comparison and assignment operators that you would use in any CF tag. To assign a value: variablename = value; To check if equal: if ( form.something eq 3 ) ... To use modulo: x = y

Redirect within cfscript?

2003-08-14 Thread Cedric Villat
Is there a cflocation equivalent that I can use from within a cfscript block? I can't see to find anything. Cedric ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http

RE: Redirect within cfscript?

2003-08-10 Thread Raymond Camden
] Sent: Tuesday, August 05, 2003 3:38 PM To: CF-Talk Subject: Redirect within cfscript? Is there a cflocation equivalent that I can use from within a cfscript block? I can't see to find anything. ~| Archives: http

Cookies in cfscript block

2003-07-23 Thread Joe Eugene
I think have done this before... can figure it out. How do you write Domain, Path etc information , when writing cookies in cfscript blocks.? e.g cfscript myCookie = cookieValue; // Is there a way to specify domain and path here? /cfscript I tried cookie.test=hello;domain=.mydomain.com

CFAbort in CFScript?

2003-07-14 Thread Shawn Grover
I think this is a stupid question, but is there any way to end processing of a CF page from within CFScript similar to a CFAbort. I know CFAbort is a tag, and tags can't be used in cfscript. However, there have been so many other improvements to CF with the MX release that I wouldn't

RE: CFAbort in CFScript?

2003-07-14 Thread Raymond Camden
in CFScript? I think this is a stupid question, but is there any way to end processing of a CF page from within CFScript similar to a CFAbort. I know CFAbort is a tag, and tags can't be used in cfscript. However, there have been so many other improvements to CF with the MX release that I

RE: CFAbort in CFScript?

2003-07-14 Thread Dave Watts
I know CFAbort is a tag, and tags can't be used in cfscript. In general, nearly any CFML tag can now be used within CFSCRIPT, if you're willing to write a wrapper for it using CFFUNCTION. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444

GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Tyler Silcox
Could someone please explain what GetPageContext() does within CFMX? I just came across it in one of the other posts and it got me thinking about using GetPageContext().include(somefile.cfm) for cfincludes within cfscripts, but it doesn't seem to share the same memory/variables (which, I guess,

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Robertson-Ravo, Neil (RX)
Subject: GetPageContext() function...cfinclude from a cfscript? Could someone please explain what GetPageContext() does within CFMX? I just came across it in one of the other posts and it got me thinking about using GetPageContext().include(somefile.cfm) for cfincludes within cfscripts, but it doesn't

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Robertson-Ravo, Neil (RX)
I think, there are probably people who know a shit load more about than that! -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 14:03 To: CF-Talk Subject: RE: GetPageContext() function...cfinclude from a cfscript? I believe it is used

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Andre Mohamed
java.sun.com. Alternatively, look for any JSP tutorial that mentions the context. That should get you on your way. André -Original Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:56 To: CF-Talk Subject: GetPageContext() function...cfinclude from a cfscript

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread webguy
. WG -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 14:06 To: CF-Talk Subject: RE: GetPageContext() function...cfinclude from a cfscript? I think, there are probably people who know a shit load more about than that! -Original Message

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Dan G. Switzer, II
If you want an include function for use w/CFSCRIPT, in CFMX you could just create a UDF that uses the CFINCLUDE tag. -Dan -Original Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 8:56 AM To: CF-Talk Subject: GetPageContext() function...cfinclude

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Tyler Silcox
I've tried that and it's a pain in the arse... -Original Message- From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:26 AM To: CF-Talk Subject: RE: GetPageContext() function...cfinclude from a cfscript? If you want an include function for use w/CFSCRIPT

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Raymond Camden
Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 8:21 AM To: CF-Talk Subject: RE: GetPageContext() function...cfinclude from a cfscript? I've tried that and it's a pain in the arse... -Original Message- From: Dan G. Switzer, II [mailto

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Tyler Silcox
-Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 11:01 AM To: CF-Talk Subject: RE: GetPageContext() function...cfinclude from a cfscript? Really? cffunction name=include cfargument name=template cfinclude template=#template# /cffunction

RE: GetPageContext() function...cfinclude from a cfscript?

2003-07-08 Thread Dan G. Switzer, II
I've tried that and it's a pain in the arse... I knew I shouldn't have laid out such a empty statement, but I've tried that exact UDF before and it threw some crazy errors-but I, of course, have no idea what the errors were...I'll see if I can recreate them and let you know- I wonder if

CFSCRIPT

2003-06-26 Thread Gabriel Robichaud
Hey folks. questions regarding scripting. I want to see YY as 0 not 0.25 and i want to use the modulus operator (or modulo, dont know what to call it in english) so i can get the remainder. I dont know what the operator is for cfscript. obvious answer is % but that doesnt work. So how do i

Re: CFSCRIPT

2003-06-26 Thread CF Dude
Have you tried using MOD instead of %? - Original Message - From: Gabriel Robichaud [EMAIL PROTECTED] and i want to use the modulus operator (or modulo, dont know what to call it in english) so i can get the remainder. I dont know what the operator is for cfscript. obvious answer

RE: CFSCRIPT

2003-06-26 Thread Nagy, Daniel J
% = MOD Int() will return a float as a whole number. -Original Message- From: Gabriel Robichaud [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 1:56 PM To: CF-Talk Subject: CFSCRIPT Hey folks. questions regarding scripting. I want to see YY as 0 not 0.25 and i want to use

Re: CFSCRIPT

2003-06-26 Thread Gabriel Robichaud
perfect thanks!! Nagy, Daniel J wrote: % = MOD Int() will return a float as a whole number. -Original Message- From: Gabriel Robichaud [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 1:56 PM To: CF-Talk Subject: CFSCRIPT Hey folks. questions regarding scripting

Re: CFSCRIPT syntax

2003-06-20 Thread Calvin Ward
Walker [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, June 19, 2003 10:23 PM Subject: RE: CFSCRIPT syntax Hi Mark, Just to add to Raymond's comments, I think the confusion about hashes and quotes comes about from CF tags, where you DO need them when you are passing a numeric

Re: CFSCRIPT syntax

2003-06-20 Thread Matthew Walker
Do not enclose complex expressions, such as 1 + 2, with pound signs. Curiously enough you can do this with CFMX. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription:

RE: CFSCRIPT syntax

2003-06-20 Thread DURETTE, STEVEN J (AIT)
a cfparam inside of cfscript, I THINK (don't hold me to this) that the only way to do this is: cfscript if(not isDefined(FORM.Date)) FORM.Date = Now(); /cfscript Of course, this uses the example above and would require more code if you wanted to ensure the type of data that was coming

CFSCRIPT syntax

2003-06-19 Thread Mark Leder
Hi All, I'm going through some code and converting CFSET commands to CFSCRIPT -- a couple of syntax questions: 1) Where I have a cfset SESSION.ecom.storeVar = SESSION.ecom.s Should I surround the var with quotes or not? Ie: SESSION.ecom.storeVar = SESSION.ecom.s; 2) Similarly, where I

RE: CFSCRIPT syntax

2003-06-19 Thread Raymond Camden
: SESSION.ecom.admin = #URL.admin#; Don't use the pound signs, you don't need them: cfset session.ecom.admin = url.admin cfscript session.ecom.admin = url.admin; /cfscript 3) With numeric values, do I need to surround with quotes, ie: SESSION.ecom.totalCost = 0; No. 4) Can a CFPARAM

RE: CFSCRIPT syntax

2003-06-19 Thread Matthew Walker
quotes around strings, and you only need hashes when inserting an expression into a string or cfoutputting it More or less. 4) Can a CFPARAM statement be written in CFSCRIPT? If so, how? Take a look at this udf: http://www.cflib.org/udf.cfm?ID=144

switch in CFSCRIPT

2003-06-06 Thread CF Dude
Is there a way to do multiple values per case statement when doing a switch inside of a cfscript tag? cfscript switch (iAnsType){ case 6 : sAnswer = Replace(sAnswer, ,, |, ALL); case 7 : sAnswer = Replace(sAnswer, ,, |, ALL); } /cfscript EG, I was hoping to do

RE: switch in CFSCRIPT

2003-06-06 Thread DURETTE, STEVEN J (AIT)
This should do what you are looking for: cfscript switch (iAnsType){ case 6 : case 7 : sAnswer = Replace(sAnswer, ,, |, ALL); } /cfscript -Original Message- From: CF Dude [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 12:39 PM To: CF-Talk Subject: switch

RE: switch in CFSCRIPT

2003-06-06 Thread Adrian Lynch
I think you just use something like below, syntax might be a little(or alot) wrong though cfscript switch (iAnsType) { case 6: case 7: sAnswer = Replace.; } /cfscript Ade -Original Message- From: CF Dude

RE: switch in CFSCRIPT

2003-06-06 Thread Philip Arnold
Also, don't forget to put a break; after your code in the case So, it should be; cfscript switch (iAnsType){ case 6 : case 7 : {sAnswer = Replace(sAnswer, ,, |, ALL); break; } } /cfscript Is there a way to do multiple values per case statement when

<    3   4   5   6   7   8   9   10   11   12   >