?
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
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:
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
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
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.
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
: 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
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
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.
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
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
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
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?
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
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
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
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,
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
18 matches
Mail list logo