How to make a dynamic category bold when selected

WIN XP PRO
DWMX
Classic ASP VBScript
MS Access

Hello.  I have a simple page with dynamic category links on the left side.  When one is clicked, its respective main image appears in the center of the page with "Next" and "Previous" links below to page through the recordset.

I would like to have the category that is selected to become bold.  How could I do this?
I don't know if it would be ASP or Javascript or both.

Here's the link for reference:  <http://www.whitneywood.com/work.asp>

Just click a Category link on the left.  Whichever you click, I would like it to become bold.

Thank you so much,
Shane
lshaneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mass Dot NetCommented:
Can you provide some of the code you use to create / generate the Category links on the left?
0
lshaneAuthor Commented:
Hi, deathtospam.  You bet.  It's just a standard DWMX recordset.  I'll attach it.  I'll also attach the section to display the categories.

Thanks so much!
======================================================================
Categories DWMX recordset
======================================================================
<%
Dim rsCategories
Dim rsCategories_numRows
 
Set rsCategories = Server.CreateObject("ADODB.Recordset")
rsCategories.ActiveConnection = MM_connwhitney_STRING
rsCategories.Source = "SELECT * FROM categories"
rsCategories.CursorType = 0
rsCategories.CursorLocation = 2
rsCategories.LockType = 1
rsCategories.Open()
 
rsCategories_numRows = 0
%>
 
======================================================================
Code to display the dynamic data on the left
======================================================================
<td width="240"><a href="work.asp?catID=<%=(rsCategories.Fields.Item("catID").Value)%>"><%=(rsCategories.Fields.Item("catName").Value)%></a></td>

Open in new window

0
Mass Dot NetCommented:
Give this a shot and let me know if it makes sense / work.
======================================================================
Add this code above the Categories DWMX recordset area:
======================================================================
<%
iSelectedCatID = 0
If IsNumeric(Request("catID")) Then
	iSelectedCatID = CLng(Request("catID"))
End If
%>
 
======================================================================
Revise your code to display the dynamic data on the left like this:
======================================================================
<%
iCatID = CLng(rsCategories.Fields.Item("catID").Value)
sCategoryNameHTML = rsCategories.Fields.Item("catName").Value
 
If (iCatID = iSelectedCatID) Then
	sCategoryNameHTML = "<b>" & sCategoryNameHTML & "</b>"
End If
%>
<td width="240"><a href="work.asp?catID=<%=iCatID%>"><%=sCategoryNameHTML%></a></td>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

hieloCommented:
Update the following line:
<td width="240"><a href="work.asp?catID=<%=(rsCategories.Fields.Item("catID").Value)%>"><%=(rsCategories.Fields.Item("catName").Value)%></a></td>

 so that it looks like the attached code
<%
Dim id
id = CInt( Request("catID") )
If id = rsCategories.Fields.Item("catID").Value Then
%>
	<td width="240"><a href="work.asp?catID=<%=(rsCategories.Fields.Item("catID").Value)%>"><strong><%=(rsCategories.Fields.Item("catName").Value)%></strong></a></td> 
<%
Else
%>
	<td width="240"><a href="work.asp?catID=<%=(rsCategories.Fields.Item("catID").Value)%>"><%=(rsCategories.Fields.Item("catName").Value)%></a></td> 
<%
End If
%>

Open in new window

0
lshaneAuthor Commented:
Thank you deathtospam and hielo.  Both solutions worked and I will be able to use both on other pages.

I will split the points.


Thanks so much,
Shane

0
lshaneAuthor Commented:
Thank you so much!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.