cfmenu, Ajax and the active item
I am having a problem that I can't find an answer on.
I have a vertical cfmenu being populated by a database. Clicking on the form category on the left shows the forms in that category on the right. Simple enough. The display of the form list is handled by a simple ajax call to pull the info in without having to reload the page. Simple enough. The problem is that I want the current category to stay highlighted (like when you mouse over it) while displaying that category. Here is my code:
<cflayout type="hbox" padding="15" style="height:auto;" >
<cflayoutarea align="left" style="height:auto">
<h3>Form Categories</h3>
<cfmenu type="vertical" width="175" name="myMenu" selectedfontcolor="000000" selecteditemcolor="000099">
<cfoutput query="getFormCategories">
<cfmenuitem name="#identifier#" display="#category#" href="javascript:ColdFusion.navigate('getForms.cfm?cat=#categoryid#','formDiv')"/>
</cfoutput>
</cfmenu>
</cflayoutarea>
<cflayoutarea size="500" style="height:auto;">
<cfdiv id="formDiv">
<div style="text-align:center;">
<br><br><br>Select a category to the left<br>to show all the forms in that category
</div>
</cfdiv>
</cflayoutarea>
</cflayout>
Any ideas how I can keep the category menu item highlighted when it's displaying the forms from that category?
