Sorry, I added the list after sending the previous code. (Actually, I don't care if I have a list of the stylenames or not; I just want to get one of the style name values from the query into each of the onClick events.) The format of the list is defaulted to commas.
Here's the code with the CF list.
<cfquery name="q_menu" datasource="mchfaq">
SELECT * from qa_menu
order by menu_sortText
</cfquery>
<cfoutput>
<cfset bmarklinkList = #ValueList(q_menu.menu_bmarkLink)#>
<script language="_javascript_" type="text/_javascript_">
<!--
function targetid(){
return #bmarklinkList#;
}
-->
</script>
</cfoutput>
<ul>
<cfoutput query="q_menu">
<li><A HREF="" q_menu.menu_nonBmarkLink neq "">"#q_menu.menu_nonBmarkLink#"><cfelse>"##Ans"
</a></li>
</cfoutput>
</ul>
Basically, if the href value is an external URL, ignore the rest of the if statement. If the href value is a bookmark link, have the href go to a specific position on the page, (#Ans), and using CSS display the previously hidden content of the style names in the onClick.
I've substituted style name values where the js goes, like so:
<li><A HREF="" q_menu.menu_nonBmarkLink neq""> "#q_menu.menu_nonBmarkLink#"><cfelse>"##Ans"
</a> </li>
<li><A HREF="" q_menu.menu_nonBmarkLink neq"">"#q_menu.menu_nonBmarkLink#"><cfelse>"##Ans"
</a> </li>
<li><A HREF="" q_menu.menu_nonBmarkLink neq"">"#q_menu.menu_nonBmarkLink#">< cfelse>"##Ans"
</li>
I'd really like this to work. I think I could use this code a lot.
Thanks again.
Joy
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

