1959mvp
05-10-2008, 02:49 PM
I am trying to modify a navigation bar that is currently utilizing mouseover and mouseout events. I would like to add mouseonclick event to change a tab to a different color when clicked, so that the user can remember which tab has been clicked. Is it possible to use the mouseonclick to do this?
Any help clarifying or explaining would be appreciated.
Here is the current code:
<td width="23%"><a href="index.asp?PageAction=VIEWCATS&Category=20" onMouseOver="MM_swapImage('Image2','','Images/assets/tabs/bogeywearON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/bogeywear.gif" alt="Wearables" name="Image2" width="103" height="45" border="0" id="Image2"></a></td>
<td width="24%"><a href="index.asp?PageAction=VIEWCATS&Category=25" onMouseOver="MM_swapImage('Image3','','Images/assets/tabs/bogeygearON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/bogeygear.gif" alt="Playables" name="Image3" width="104" height="45" border="0" id="Image3"></a></td>
<td width="15%"><a href="index.asp?PageAction=VIEWCATS&Category=26" onMouseOver="MM_swapImage('Image4','','Images/assets/tabs/sponsorsignsON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/sponsorsigns.gif" alt="Drinkables" name="Image4" width="206" height="45" border="0" id="Image4"></a></td>
<td width="30%"><a href="index.asp?PageAction=VIEWCATS&Category=13" onMouseOver="MM_swapImage('Image5','','Images/assets/tabs/prizepacksON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/prizepacks.gif" alt="Prize Packs" name="Image5" width="104" height="45" border="0" id="Image5"></a></td>
<td width="8%"><a href="index.asp?PageAction=Custom&ID=119" onMouseOver="MM_swapImage('Image6','','Images/assets/tabs/giftcardsON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/giftcards.gif" alt="Gift Cards" name="Image6" width="103" height="45" border="0" id="Image6"></a></td>
I would like to modify this to have the tab maintain a different color on click, helping the user remember where they are in the nav. Can mouseonclick accompliosh this or is there a better way?
Any help clarifying or explaining would be appreciated.
Here is the current code:
<td width="23%"><a href="index.asp?PageAction=VIEWCATS&Category=20" onMouseOver="MM_swapImage('Image2','','Images/assets/tabs/bogeywearON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/bogeywear.gif" alt="Wearables" name="Image2" width="103" height="45" border="0" id="Image2"></a></td>
<td width="24%"><a href="index.asp?PageAction=VIEWCATS&Category=25" onMouseOver="MM_swapImage('Image3','','Images/assets/tabs/bogeygearON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/bogeygear.gif" alt="Playables" name="Image3" width="104" height="45" border="0" id="Image3"></a></td>
<td width="15%"><a href="index.asp?PageAction=VIEWCATS&Category=26" onMouseOver="MM_swapImage('Image4','','Images/assets/tabs/sponsorsignsON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/sponsorsigns.gif" alt="Drinkables" name="Image4" width="206" height="45" border="0" id="Image4"></a></td>
<td width="30%"><a href="index.asp?PageAction=VIEWCATS&Category=13" onMouseOver="MM_swapImage('Image5','','Images/assets/tabs/prizepacksON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/prizepacks.gif" alt="Prize Packs" name="Image5" width="104" height="45" border="0" id="Image5"></a></td>
<td width="8%"><a href="index.asp?PageAction=Custom&ID=119" onMouseOver="MM_swapImage('Image6','','Images/assets/tabs/giftcardsON.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="Images/assets/tabs/giftcards.gif" alt="Gift Cards" name="Image6" width="103" height="45" border="0" id="Image6"></a></td>
I would like to modify this to have the tab maintain a different color on click, helping the user remember where they are in the nav. Can mouseonclick accompliosh this or is there a better way?