goes
<cfquery name=getStyle>
SELECT styleName FROM styleDB
</cfquery>
<cfoutput query="getStyle">
<br>some stuff #styleName# some other stuff
</cfoutput>
will provide getStyle.RecordCount lines of output, 1 for each row in
the query
the #styleName# in each line of output will contain the styleName
corresponding to the one in getStyle.CurrentRow
HTH
Dick
On Apr 13, 2004, at 5:07 AM, Joy Holman wrote:
> I am outputting style name values using CF query-results. I'm
>
> making those values available to _javascript_ in a variable so I
>
> can use the values in an onClick event.
>
> If I only needed the variable's last style name value returned
>
> by the query, I could use the following:
>
> < cfoutput>
> < script language="_javascript_" type="text/_javascript_">
> <!--
> function targetid(){
> return #menu_bmarkLink#;
> }
> -->
> < /script>
> < /cfoutput>
>
> < cfoutput query="Q_menu">
> < li>< A HREF="" cfif q_menu.menu_nonBmarkLink neq
> "">"#q_menu.menu_nonBmarkLink#">< cfelse>"##Ans"
> > > ext# < /a> < /li>
> < /cfoutput>
>
> The complication arises because I want each iteration of the
>
> onClick event to hold a different value for the style name
>
> variable.
>
> What do I have to do to iterate through the style name values
>
> from the query so each onClick event iteration has a different
>
> value - like this:
> < li><A HREF="" cfif q_menu.menu_nonBmarkLink neq
> "">"#q_menu.menu_nonBmarkLink#">< cfelse>"##Ans"
> > > /cfif>#q_menu.menu_Text# < /a> < /li>
>
> < li>< A HREF="" cfif q_menu.menu_nonBmarkLink neq
> "">"#q_menu.menu_nonBmarkLink#">< cfelse>"##Ans"
> > > /cfif>#q_menu.menu_Text# < /a> < /li>
>
> < li>< A HREF="" cfif q_menu.menu_nonBmarkLink neq
> "">"#q_menu.menu_nonBmarkLink#">< cfelse>"##Ans"
> /cfif>#q_menu.menu_Text#
> < /a> < /li>
>
> Thank you in advance!! I've got an app in development that
>
> hinges on this code!!!
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

