Re: CFScript help

2011-08-22 Thread Josh Cesana
Thanks all - the built in function is exactly what I needed. I am fairly new to CF so I will definitely spend time learning the functions. Thanks again. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-C

Re: CFScript help

2011-08-22 Thread Justin Scott
> Wow: LJustify(), RJustify(), and CJustify() functions. Who > woulda thunk it. Brilliant. I guess. Whenever I'm working with people relatively new to CF my number one piece of advice is to become very familiar with the function reference so you don't spend a bunch of time re-writing functions th

Re: CFScript help

2011-08-22 Thread Dominic Watson
Wow: LJustify(), RJustify(), and CJustify() functions. Who woulda thunk it. Brilliant. I guess. On 22 August 2011 17:37, Justin Scott wrote: > >> I'm attemping to create a function that adds spaces either >> in front of or behind a string. > > Hi Josh, a couple of things.  First, ColdFusion has

Re: CFScript help

2011-08-22 Thread Dominic Watson
just off the top of my head: function spaceFiller(cell, fill, align) { var space = RepeatString(' ', fill - Len(Cell)); return iif(align eq 'R', de(space & cell), de(cell & space)); } You may need to deal with the scenario of cell having more characters than the value of fill. Also, if

Re: CFScript help

2011-08-22 Thread morgan l
If you're displaying this in a browser, then HTML is likely the culprit, condensing multiple spaces into just one. Use non-breaking spaces (or wrap your output in tags) to get HTML to output multiple spaces. On Mon, Aug 22, 2011 at 11:19 AM, Josh Cesana wrote: > > I'm attemping to create a func

Re: CFScript help

2011-08-22 Thread Justin Scott
> I'm attemping to create a function that adds spaces either > in front of or behind a string. Hi Josh, a couple of things. First, ColdFusion has the LJustify(), RJustify(), and CJustify() functions which will do exactly what you're trying to accomplish already built in. Second, your function (

CFScript help

2011-08-22 Thread Josh Cesana
I'm attemping to create a function that adds spaces either in front of or behind a string. For example, I want this "test" string to have 6 spaces after it, plus the 4 characters in "test" for a total of 10 characters. I have an "align" variable for both left and right alignment for the spaces.

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 o

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: Dominic On 28/01/2008, Dominic Watson <[EMAIL PROTECTED]> wrote: > > A random guess, but try removing all the cfoutput tags and wrap the whole

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

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 workin

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

2003-03-25 Thread charlie griefer
for (i=0, i LT #listLen(form.fieldNames)#, i=i+1) { if (listFindNoCase(form.roles, i, ",") { writeOutput(i); } } banged out really quickly...but hopefully will do what you need (or at least, get you started on the right track) charlie Trent Shepherd writes: > I am hav

RE: cfscript help

2003-03-25 Thread Barney Boisvert
(formerly PIER System, Inc.) [EMAIL PROTECTED] voice : 360.671.8708 x12 fax : 360.647.5351 www.audiencecentral.com > -Original Message- > From: Trent Shepherd [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 25, 2003 8:37 AM > To: CF-Talk > Subject: cfscript help > > >

Re: cfscript help

2003-03-25 Thread Michael Dinowitz
us/blog > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -Original Message- > > From: Trent Shepherd [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, March 25, 2003 10:37 AM > > To: CF-Talk &g

RE: cfscript help

2003-03-25 Thread Mike Townend
iginal Message- From: Trent Shepherd [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 16:37 To: CF-Talk Subject: cfscript help I am having a block on rewriting the following in cfscript #fnames# thanks in adv

RE: cfscript help

2003-03-25 Thread Raymond Camden
10:37 AM > To: CF-Talk > Subject: cfscript help > > > I am having a block on rewriting the following in cfscript > > > > > > > > #fnames# >

cfscript help

2003-03-25 Thread Trent Shepherd
I am having a block on rewriting the following in cfscript #fnames# thanks in advance trent ~| Archives: http://www.houseoffusion.com/cf_lists/ind

RE: Cfscript help

2003-01-02 Thread Adam Reynolds
> > ref = insert('0',ref,0); is better. > -Original Message- > From: Ryan Mitchell [mailto:[EMAIL PROTECTED]] > Sent: 02 January 2003 12:35 > To: CF-Talk > Subject: Re: Cfscript help > > > Brilliant this worked... thanks, didn¹t realise you nee

Re: Cfscript help

2003-01-02 Thread Ryan Mitchell
t; should it not be > ref = insert('0','#ref#',0); > >> -Original Message- >> From: Ryan Mitchell [mailto:[EMAIL PROTECTED]] >> Sent: 02 January 2003 12:21 >> To: CF-Talk >> Subject: Re: Cfscript help >> >> >> Brackets

Re: Cfscript help

2003-01-02 Thread Taz
insert() returns a string, but you're not setting ref as the new string. Therefore you get an infinite loop BTW, you should ditch the use of ##s Taz > Brackets were wrong - thanks, but its still times out! > Any other thoughts? > ryan ~~~

RE: Cfscript help

2003-01-02 Thread Mike Townend
2003 12:21 To: CF-Talk Subject: Re: Cfscript help Brackets were wrong - thanks, but its still times out! Any other thoughts? ryan On 2/1/03 12:12, "Mike Townend" <[EMAIL PROTECTED]> wrote: > Could be the brackets... Try... > > > while (len(#

RE: Cfscript help

2003-01-02 Thread Adam Reynolds
Have you considered that ref does not actually get bigger? should it not be ref = insert('0','#ref#',0); > -Original Message- > From: Ryan Mitchell [mailto:[EMAIL PROTECTED]] > Sent: 02 January 2003 12:21 > To: CF-Talk > Subject: Re: Cfscript help >

Re: Cfscript help

2003-01-02 Thread Ryan Mitchell
> > > -Original Message- > From: Ryan Mitchell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 2, 2003 12:07 > To: CF-Talk > Subject: Cfscript help > > > Hey > > Why does the following cfscript take absolutely AGES to load? > > >

RE: Cfscript help

2003-01-02 Thread Mike Townend
Could be the brackets... Try... while (len(#ref#) LT 5) { insert('0','#ref#',0); } -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 2, 2003 12:07 To: CF-Talk Subject: Cfscript help Hey Why does the fol

Cfscript help

2003-01-02 Thread Ryan Mitchell
Hey Why does the following cfscript take absolutely AGES to load? while (len(#ref# LT 5)) { insert('0','#ref#',0); } Ryan ** posted to the cf-linux list by accident -- oops! ~| Archives: http://www.houseoffusion.com/cf_lists

Re: CFSCRIPT help

2002-06-27 Thread mark brinkworth
> >> > I'm not sure what makes a variable "good" in this case, but if you > >> > offer more information, perhaps I can offer more information. > >> > >>I'm checking the value of a date to make sure it's legal. (I've had no > >>end of problems with the date parsing side of CFINPUT so I'm figur

RE: CFSCRIPT help

2002-06-27 Thread Bill Henderson
s in year."; } tempdate = CreateDate(year,month,1); if (day gt daysinmonth(tempdate)) { return "Date exceeds days in month."; } date = CreateDate(year,month,day); return DateFormat(date,"mm/dd/yyyy"); } Bill Henderson [EMAIL PROTECTED] --

RE: CFSCRIPT help

2002-06-27 Thread S . Isaac Dealey
Not sure aobut the months other than using (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Nov) ... though it looks like your regex has a few extra characters... > ReFind("^([0-9]{1,2})([[:punct:]]|[[:space:]]){1,}[0-9]{1,2}?(([[:punct: ]]|[[:space:]]){1,}([0-9]{2}|[0-9]{4}))$",date)) Looking at it... this

RE: CFSCRIPT help

2002-06-27 Thread Bill Henderson
;mm/dd/"); } #checkDate(form.mydate)# Bill Henderson [EMAIL PROTECTED] -Original Message----- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 11:31 AM To: CF-Talk Subject: Re: CFSCRIPT help > At 01:46 PM 6/27/02 -0400, S. Isa

Re: CFSCRIPT help

2002-06-27 Thread Jeffry Houser
At 02:16 PM 6/27/2002 -0400, you wrote: > > At 01:57 PM 6/27/2002 -0300, you wrote: > >>At 12:45 PM 6/27/02 -0400, Jeffry Houser wrote: > >> > I'm not sure what makes a variable "good" in this case, but if you > >> > offer more information, perhaps I can offer more information. > >> > >>I'm ch

Re: CFSCRIPT help

2002-06-27 Thread S . Isaac Dealey
> At 01:46 PM 6/27/02 -0400, S. Isaac Dealey wrote: >>function validDate(mydate) { >> if (not >> ReFind(mydate,"[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9][0-9][0-9]")) { return >> "Inavlid Date Mask"; } >> var day = listfirst(mydate,"/"); >> var month = listgetat(mydate,2,"/"); >>

Re: CFSCRIPT help

2002-06-27 Thread S . Isaac Dealey
> At 01:57 PM 6/27/2002 -0300, you wrote: >>At 12:45 PM 6/27/02 -0400, Jeffry Houser wrote: >> > I'm not sure what makes a variable "good" in this case, but if you >> > offer more information, perhaps I can offer more information. >> >>I'm checking the value of a date to make sure it's legal.

Re: CFSCRIPT help

2002-06-27 Thread Thane Sherrington
At 01:49 PM 6/27/02 -0400, S. Isaac Dealey wrote: > > How many variables can I return with a CFSCRIPT block? > >You mean with a UDF ? ... As many as you want ... as long as they're all >part of the same complex object like a query, structure or array ... Sorry, I meant a UDF. Thanks for this as

Re: CFSCRIPT help

2002-06-27 Thread Thane Sherrington
At 01:50 PM 6/27/02 -0400, Jeffry Houser wrote: > Are you saying that you are being given April 5th (I.e. 4/5/2002) and the >system is seeing it as May 4th (5/4/2002)? What are the problems with >EuroDate validation? This is exactly the problem. Eurodate sometimes takes the date correctly an

Re: CFSCRIPT help

2002-06-27 Thread Thane Sherrington
At 01:46 PM 6/27/02 -0400, S. Isaac Dealey wrote: >function validDate(mydate) { > if (not > ReFind(mydate,"[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9][0-9][0-9]")) { return > "Inavlid Date Mask"; } > var day = listfirst(mydate,"/"); > var month = listgetat(mydate,2,"/"); >

Re: CFSCRIPT help

2002-06-27 Thread Jeffry Houser
I want to make sure I clarify that CFScript blocks and UDF functions are two completely different things. In a UDF, you can only return a single value. That value can be a complex value (Array or Structure), though. CFScript blocks don't explicitly return any values, although you can cr

Re: CFSCRIPT help

2002-06-27 Thread S . Isaac Dealey
> How many variables can I return with a CFSCRIPT block? You mean with a UDF ? ... As many as you want ... as long as they're all part of the same complex object like a query, structure or array ... function foo() { var myreturn = new Structure(); myreturn.hello = "hello";

Re: CFSCRIPT help

2002-06-27 Thread S . Isaac Dealey
> I'm passing the date entered and the date mask. The UDF pulls out the > value of the date (day, month and year fine) but I want to be able to > check to see if it is a legal day and month before making it into an > ODBC date. > > So I'm doing something like this: > > Check to see what mask is w

Re: CFSCRIPT help

2002-06-27 Thread Thane Sherrington
At 01:22 PM 6/27/02 -0400, Jeffry Houser wrote: > I do worry that you are re-inventing the wheel. Have you looked at the >IsDate or LSIsDate function? > I'm not sure if ColdFusion has a specific way to compare against a given >mask, though, but if your intent is to turn it into an ODBC date,

Re: CFSCRIPT help

2002-06-27 Thread Jeffry Houser
At 01:57 PM 6/27/2002 -0300, you wrote: >At 12:45 PM 6/27/02 -0400, Jeffry Houser wrote: > > I'm not sure what makes a variable "good" in this case, but if you offer > >more information, perhaps I can offer more information. > >I'm checking the value of a date to make sure it's legal. (I've had

Re: CFSCRIPT help

2002-06-27 Thread Thane Sherrington
At 12:45 PM 6/27/02 -0400, Jeffry Houser wrote: > I'm not sure what makes a variable "good" in this case, but if you offer >more information, perhaps I can offer more information. I'm checking the value of a date to make sure it's legal. (I've had no end of problems with the date parsing side

Re: CFSCRIPT help

2002-06-27 Thread Jeffry Houser
This is, sadly, one of the worst documented features of ColdFusion. A whole chapter is devoted to it in ColdFusion: A Beginner's Guide. ( Most everything in the book still applies to ColdFusion MX) http://www.amazon.com/exec/obidos/ASIN/0072191090/instantcoldfu-20 I'm guessing you want t

Re: CFSCRIPT help

2002-06-27 Thread Michael Dinowitz
www.houseoffusion.com/docs/cfscript.htm At 12:11 PM 6/27/02, you wrote: >Can someone suggest a good book or site on CFSCRIPT? I'm trying to write a >script that will test a variable and if the variable is good, do some >calculations on it and return the finished value, but if it's bad, it'll

CFSCRIPT help

2002-06-27 Thread Thane Sherrington
Can someone suggest a good book or site on CFSCRIPT? I'm trying to write a script that will test a variable and if the variable is good, do some calculations on it and return the finished value, but if it's bad, it'll break out with an error message. Other than nesting a lot of ifs, I can't

RE: The mysterious CFSCRIPT...... Help

2001-01-08 Thread Robert Everland III
om: Jeff W [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 3:58 PM To: CF-Talk Subject: The mysterious CFSCRIPT.. Help I am interesting in learning cfsript Has anyone seen any tutorials on the web? Is there any books written on it?? To me it seems there is not alot information

RE: The mysterious CFSCRIPT...... Help

2001-01-08 Thread Park, Simon
-4301 Alexandria, VA 22304 http://www.csmi.com > -Original Message- > From: Jeff W [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 08, 2001 3:58 PM > To: CF-Talk > Subject: The mysterious CFSCRIPT.. Help > > > I am interesting in learning cfs

Re: The mysterious CFSCRIPT...... Help

2001-01-08 Thread Michael Dinowitz
www.houseoffusion.com/script.ppt Michael Dinowitz Publisher: Fusion Authority weekly news alert (www.fusionauthority.com/alert) Listmaster: CF-Talk, CF-Jobs, Spectra-Talk, Jrun-Talk, etc. (www.houseoffusion.com) > I am interesting in learning cfsript > > Has anyone seen any tutorials on the we

The mysterious CFSCRIPT...... Help

2001-01-08 Thread Jeff W
I am interesting in learning cfsript Has anyone seen any tutorials on the web? Is there any books written on it?? To me it seems there is not alot information in even the current cold fusion books about it. I know its supposed to be simmilar to javascript and somewhat asp. I've seen SOME cfscript