this won't do all you want, if you're wanting to assign things statically,
but you can always take care of that after/before the looping:

<cfoutput>
<cfloop index="i" from="1" to="#foo.recordcount#">
     dqm__subdesc#foo.section[i]#_#DecrementValue(i)# = "#foo.pagetitle[i]
#" ;
</cfloop>
</cfoutput>

??


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                            
                    Dave Phipps                                                        
                            
                    <[EMAIL PROTECTED]        To:     ColdFusion User group <[EMAIL 
PROTECTED]>               
                    cf.co.uk>            cc:                                           
                            
                                         Subject:     [ cf-dev ] Javascript menus from 
query                       
                    02/25/03                                                           
                            
                    02:51 PM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    dev                                                                
                            
                                                                                       
                            
                                                                                       
                            





Hi,

I am looking into ways of setting up something and I was wondering if
anyone could provide some suggestions/code etc.

I have some drop-down menus which us the following syntax to build each
drop-down:

dqm__subdesc2_0 = "News Service" ;
  dqm__subdesc2_1 = "Flame";
  dqm__subdesc2_2 = "Diary";
  dqm__subdesc2_3 = "Conference";
  dqm__subdesc2_4 = "Media Office";
  dqm__subdesc2_5 = "Grants & Funds";
  dqm__subdesc2_6 = "Campaigns";

This set of menuse would be for the News section with an id of 2.

Now what I want to be able to do is calculate the second number dynamically

so that I have something like this:
<cfoutput query=foo>
dqm__subdesc#section#_#item# = "#pagetitle#" ;
</cfoutput>

The problem is that the query grabs not only section id 2 but also many
other sections.  Therefore I can't use queryname.currentrow as it also has
to start with a 0 (zero) for each new drop-down.  E.g.:

dqm__subdesc2_0 = "News Service" ;
  dqm__subdesc2_1 = "Flame";
  dqm__subdesc2_2 = "Diary";
  dqm__subdesc2_3 = "Conference";

  dqm__subdesc3_0 = "Media Office";
  dqm__subdesc3_1 = "Grants & Funds";
  dqm__subdesc3_2 = "Campaigns";

If any of the numbers are missed then the drop-down does not work.  Has
anyone ever done anything like this before?

There is also the added complication of fixed items which are no changeable

which would be statically assigned to the list.

So in the example above it might end up like this:

dqm__subdesc2_0 = "News Service" ;
<cfoutput query=foo>
dqm__subdesc2_#item# = "#pagetitle#" ;
</cfoutput>

  dqm__subdesc3_0 = "Media Office";
  dqm__subdesc3_1 = "Grants & Funds";
  dqm__subdesc3_2 = "Campaigns";
<cfoutput query=foo>
dqm__subdesc3_#item# = "#pagetitle#" ;
</cfoutput>

The dynamic menus would then have to start from the next number in the
array - what is the best way to do this?

My other option is to create an admin page where you have to assign the
#item# number to each menu which I want to avoid if possible.

Cheers

Dave


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to