shouldn't your second option value have a matching pound sign

                <option value="" selected="selected">DDL2</option>
                     <cfoutput query="q2">
                 <option value="#ID">#ITEM#</option>
 <!----------------------- #ID should be #ID#
                     </cfoutput>

Also I'm a big proponent to <cfparams.. you can set default values with
<cfparam to guarentee a field is ALWAYS present..
<cfparam name="url.variable22" default="0" />

<cfif url.variable22 neq 0> blah </cfif>


On Tue, Sep 27, 2011 at 12:38 AM, William Seiter <[email protected]> wrote:

>
> How did you want your conditional to read?
> Currently CF is reading
> cfif isdefined('url.variable22') AND url.variable22 eq 'OEX'
> OR
> url.variable22 eq 'RT'
>
> Add some parenthesis to control the cfif statement.
>
> Cfif isDefined('url.variable22') AND
> (url.variable EQ 'OEX' or url.variable EQ 'RT')
>
> Personally I would prefer this method:
> <cfif structKeyExists(url, 'variable22') AND listFind('OEX,RT',
> url.variable22) neq 0>
>
>                        <option value="" selected="selected">DDL1</option>
>                      <cfoutput query="q1">
>                      <option value="#ID#">#ITEM#</option>
>                      </cfoutput>
>
>                      <cfelse>
>
>                      <option value="" selected="selected">DDL2</option>
>                      <cfoutput query="q2">
>                      <option value="#ID">#ITEM#</option>
>                      </cfoutput>
>
>                     </cfif>
>
> Hope this helps,
> William
>
> -----Original Message-----
> From: Mo Lay [mailto:[email protected]]
> Sent: Monday, September 26, 2011 8:53 PM
> To: cf-newbie
> Subject: <cfif isDefined URL.ID not working
>
>
> Hi Guys ,
> i am trying  to get one of the dropdown DDL1 or DDL2 based on the url
> parameter passed here ..
> it does not give me what i want :
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5637
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to