Radmenu for DNN

2 posts, 0 answers
  1. Alex Lawson
    Alex Lawson avatar
    43 posts
    Member since:
    May 2008

    Posted 01 Oct 2011 Link to this post

    I am using the latest radskin objects dnn module, but need to change the font color of the menu item when the relavent DNN page is displayed.  Can this be achieved via javascript?  If so please help :-)
  2. Peter
    Peter avatar
    6637 posts

    Posted 05 Oct 2011 Link to this post

    Hello Alex,

    Attached is a simple demo of the desired functionality.
    <script type="text/javascript">
           function OnClientLoad(sender) {
               var menu = sender;
               for (var i = 0; i < menu.get_allItems().length; i++) {
                   var item = menu.get_allItems()[i];
                   var currentUrl = window.location.toString();
                   if (currentUrl.match(item.get_navigateUrl()) != null) {
       <telerik:RadMenu ID="RadMenu1" runat="server" OnClientLoad="OnClientLoad">
               <telerik:RadMenuItem runat="server" NavigateUrl="PageA.aspx" Text="Page A">
               <telerik:RadMenuItem runat="server" NavigateUrl="PageB.aspx" Text="Page B">
               <telerik:RadMenuItem runat="server" NavigateUrl="PageC.aspx" Text="Page C">

    Best wishes,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top