Why is CF giving me grief over this code?

2008-05-29 Thread Rick Faircloth
? cfif isdefined('url.property_type') cfswitch expression='#url.property_type#' cfelse cfswitch expression='#form.property_type#' /cfif It's complaining with this error: Context validation error for the cfelse tag. The tag must be nested inside a CFIF tag. Can cfswitch tags not be

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Barney Boisvert
you have to close the CFSWITCH tag On Thu, May 29, 2008 at 8:57 AM, Rick Faircloth [EMAIL PROTECTED] wrote: ? cfif isdefined('url.property_type') cfswitch expression='#url.property_type#' cfelse cfswitch expression='#form.property_type#' /cfif It's complaining with this error:

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Loathe
You need to have a closing cfswitch containing cfcases for it to work. Rick Faircloth wrote: ? cfif isdefined('url.property_type') cfswitch expression='#url.property_type#' cfelse cfswitch expression='#form.property_type#' /cfif It's complaining with this error: Context

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Charlie Griefer
On Thu, May 29, 2008 at 8:57 AM, Rick Faircloth [EMAIL PROTECTED] wrote: ? cfif isdefined('url.property_type') cfswitch expression='#url.property_type#' cfelse cfswitch expression='#form.property_type#' /cfif It's complaining with this error: Context validation error for the cfelse

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Ian Skinner
Rick Faircloth wrote: Can cfswitch tags not be nested inside cfif tags? Rick The whole cfswitch... tag can be, but not just the first half. I.E. cfif... cfswittch.../cfswitch cfelse cfswitch.../cfswitch /crif Allowed. cfif... cfswittch cfelse cfswitch /crif /cfswitch Not Allowed.

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Charlie Griefer
On Thu, May 29, 2008 at 9:02 AM, Charlie Griefer [EMAIL PROTECTED] wrote: i think there's a custom tag out there that will automagically put form/URL vars into an attributes scope. This is how fusebox does it by default (and in Model-Glue it's in the 'event')... but I seem to recall a custom

RE: Why is CF giving me grief over this code?

2008-05-29 Thread Rick Faircloth
: Thursday, May 29, 2008 12:03 PM To: CF-Talk Subject: Re: Why is CF giving me grief over this code? On Thu, May 29, 2008 at 8:57 AM, Rick Faircloth [EMAIL PROTECTED] wrote: ? cfif isdefined('url.property_type') cfswitch expression='#url.property_type#' cfelse cfswitch expression

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Loathe
Steve Nelson had a tag formurl2attributes.cfm I can't seem to find it for download though. Charlie Griefer wrote: On Thu, May 29, 2008 at 8:57 AM, Rick Faircloth [EMAIL PROTECTED] wrote: ? cfif isdefined('url.property_type') cfswitch expression='#url.property_type#' cfelse cfswitch

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Gerald Guido
I have a function that does that. It is pretty old so don't make fun of me. but it works ;) http://pastebin.com/m6d287cb5 On Thu, May 29, 2008 at 12:14 PM, Loathe [EMAIL PROTECTED] wrote: Steve Nelson had a tag formurl2attributes.cfm I can't seem to find it for download though.

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Aaron Rouse
I did not look at the function but out of curiosity why not just use the StructAppend() built into CF? I often copy the URL scope into the Form on some of our pages due to not know if a value will be passed in by one or the other. So I just put in a cfset StructAppend(FORM, URL, false) / for

RE: Why is CF giving me grief over this code?

2008-05-29 Thread Brad Wood
On a side note... is it better to use 'structKeyExists(url, 'property_type')' as opposed to 'isdefined('url.property_type')' === The answer is a resounding depends. It depends on: 1) Version of Coldfusion 2) Whether or not the variable exists. 3) How

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Gerald Guido
Slaps head On Thu, May 29, 2008 at 12:33 PM, Aaron Rouse [EMAIL PROTECTED] wrote: I did not look at the function but out of curiosity why not just use the StructAppend() built into CF? I often copy the URL scope into the Form on some of our pages due to not know if a value will be passed

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Charlie Griefer
On Thu, May 29, 2008 at 9:13 AM, Rick Faircloth [EMAIL PROTECTED] wrote: On a side note... is it better to use 'structKeyExists(url, 'property_type')' as opposed to 'isdefined('url.property_type')' ??? And, if so, why?

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Gerald Guido
Oh yeah Usage: PopulateStruct(form,url) On Thu, May 29, 2008 at 12:24 PM, Gerald Guido [EMAIL PROTECTED] wrote: I have a function that does that. It is pretty old so don't make fun of me. but it works ;) http://pastebin.com/m6d287cb5 On Thu, May 29, 2008 at 12:14 PM, Loathe

RE: Why is CF giving me grief over this code?

2008-05-29 Thread Andy Matthews
Yes... StructKeyExists is better in most cases. -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2008 11:13 AM To: CF-Talk Subject: RE: Why is CF giving me grief over this code? Thanks, everyone, for clearing that up. On a side note

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Dominic Watson
i think there's a custom tag out there that will automagically put form/URL vars into an attributes scope. Can be done natively in CF with two lines of code: request.args = url; StructAppend(request.args, form); Et voila Dominic -- Blog it up: http://fusion.dominicwatson.co.uk

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Charlie Griefer
On Thu, May 29, 2008 at 11:03 AM, Dominic Watson [EMAIL PROTECTED] wrote: i think there's a custom tag out there that will automagically put form/URL vars into an attributes scope. Can be done natively in CF with two lines of code: request.args = url; StructAppend(request.args, form); ya,

Re: Why is CF giving me grief over this code?

2008-05-29 Thread Dominic Watson
Oh yeh, missed that one ;) 2008/5/29 Charlie Griefer [EMAIL PROTECTED]: On Thu, May 29, 2008 at 11:03 AM, Dominic Watson [EMAIL PROTECTED] wrote: i think there's a custom tag out there that will automagically put form/URL vars into an attributes scope. Can be done natively in CF with