Hi Seona,

I thought CRLF was

<cfset CRLF = chr(13)&chr(10)>

And I think a space *is* chr(32).

But to find a space you can just use:

<cfset idx = find(" ", "a string with a space")>

Which I think will return 2 as the value of idx.

hth,

Brett
B)

Seona Bellamy wrote:
Hey Brett!

Great! I'd forgotten all about evaluate(). *slaps head* I need to take a
break from this I think.

Now for one last thing, happen to know the way you replace a space in a
piece of text? I know that chr(32) is one half of a carriage return (I have
used that code extensively) but I can't remember how to isolate spaces.

Thanks heaps.

Seona.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brett
Payne-Rhodes
Sent: Tuesday, 4 February 2003 2:19 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Fun with dynamically named variables


Hi Seona,

Coming in a bit late here but I think you need to be using
'evaluate' as in:

<cfset variables.SkillTypeTemp = "form.#q_ClassSkill.SkillName#">
<cfif evaluate("#variables.SkillTypeTemp#") IS "Yes">
    <cfset variables.SkillType = "Yes">
<cfelse>
    ...
</cfif>

hth,

Brett
B)

Seona Bellamy wrote:

Hi Nathan,



Just two things:
(1) Are you definitely passing ClassName as a URL parameter in

the action

attribute of the form?  You are accessing it as a URL parameter,
not a form
parameter - just check that the variable is coming across.

I have all the debug stuff turned on, and yes, the parameter is
being sent

across correctly as a URL parameter. That never seemed to be the issue,
since it was still able to return the correct data in q_ClassSkill.



(2) Within your CFQUERY loop, I would modify it like this:

		<!--- Set SkillType --->
		<cfset variables.SkillTypeTemp = "#q_ClassSkill.SkillName#">

		<cfif "FORM.#variables.SkillTypeTemp#" IS "Yes">
			<cfset variables.SkillType = "Yes">

OK, tried that and I'm not getting any errors. The problem I'm
finding is

that it seems to be equating the string to the value, rather than the
formfield contents to the value. If I try without the "" around the
FORM.etc, I get the following error:

Error Diagnostic Information
Just in time compilation error

Invalid parser construct found on line 19 at position 13. ColdFusion was
looking at the following text:

.
Invalid expression format. The usual cause is an error in the expression
structure.
The last successfully parsed CFML construct was a CFIF tag occupying
document position (19:3) to (19:7).

The specific sequence of files included or processed is:
C:\Inetpub\wwwroot\AndrewDnD\gm_ClassSkills.cfm

It really seems to hate having the dynamic bit in the middle of
the variable

reference. Is there a way around this?

Or should I simply abandon this method and go about the whole
thing another

way? Any suggestions anyone?

Thanks,

Seona.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


--
Brett Payne-Rhodes
Eaglehawk Computing
t: +61 (0)8 9371-0471
f: +61 (0)8 9371-0470
m: +61 (0)414 371 047
e: [EMAIL PROTECTED]
w: www.ehc.net.au


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


--
Brett Payne-Rhodes
Eaglehawk Computing
t: +61 (0)8 9371-0471
f: +61 (0)8 9371-0470
m: +61 (0)414 371 047
e: [EMAIL PROTECTED]
w: www.ehc.net.au


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to