Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8621173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:45:39+00:00 2026-06-12T06:45:39+00:00

I have created web application where I want to highlight the menu selected. Below

  • 0

I have created web application where I want to highlight the menu selected.

Below is what I have

<div style="width: 80%;" align="left" >
    <span  style="display:inline-block;" align="left" >
        <div id="menubar" class="grid-block">
            <nav id="menu">
                <ul class="menu menu-dropdown ">
                    <li class="level1 item101 active">
                        <a href="index.xhtml" class="level1">
                            <span>
                                <span class="icon" style="background-image: url('images/menu/icon_menu_home.png');background-repeat: no-repeat; background-position: top center"> 
                                </span>
                                Home
                            </span>
                        </a>
                    </li>
                    <li class="level1 item102 parent makeSpace default" 
                        style="#{!PersonalInformationDataBean.pageViewData.contains('registerForPatentss') &amp;&amp; !PersonalInformationDataBean.pageViewData.contains('success') &amp;&amp; !PersonalInformationDataBean.pageViewData.contains('getReportss') &amp;&amp; !PersonalInformationDataBean.pageViewData.contains('searhPatentss')  ?'display:none':'display:inherit'};">
                        <a href="" class="level1 parent">
                            <span>
                                <span class="icon" style="background-image: url('images/menu/icon_menu_features.png');background-repeat: no-repeat; background-position: top center"> 
                                </span>Projects/Inventions
                            </span>
                        </a>
                        <div class="dropdown columns1">
                            <div class="dropdown-bg" style="overflow: hidden; width: 239px; height: 202px; ">
                                <div>
                                    <div class="width100 column">
                                        <ul class="level2">
                                            <li class="level2 item200" style="width: 210px;#{PersonalInformationDataBean.pageViewData.contains('registerForPatentss')?'display:inherit':'display:none'}">
                                                <a href="registerForPatentss.xhtml" class="level2">
                                                    <span>Register New Applicant
                                                    </span>
                                                </a>
                                            </li>
                                            <li class="level2 item201"  style="width: 210px;#{PersonalInformationDataBean.pageViewData.contains('success')?'display:inherit':'display:none'}">
                                                <a href="success.xhtml" class="level2">
                                                    <span>Register New Project
                                                    </span>
                                                </a>
                                            </li>
                                            <li class="level2 item202" style="width: 210px;#{PersonalInformationDataBean.pageViewData.contains('getReportss')?'display:inherit':'display:none'}">
                                                <a href="getReportss.xhtml" class="level2">
                                                    <span>Project Reports
                                                    </span>
                                                </a>
                                            </li>
                                            <li class="level2 item203"  style="width: 210px;#{PersonalInformationDataBean.pageViewData.contains('searhPatentss')?'display:inherit':'display:none'}">
                                                <a href="searhPatentss.xhtml" class="level2">
                                                    <span>Search For Project
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>


                    <li class="level1 item102 parent makeSpace default"  style="#{!PersonalInformationDataBean.pageViewData.contains('systemLog') &amp;&amp; !PersonalInformationDataBean.pageViewData.contains('addUser') &amp;&amp; !PersonalInformationDataBean.pageViewData.contains('changePass') &amp;&amp; !PersonalInformationDataBean.pageViewData.contains('userlistss')?'display:none':'display:inherit'}">
                        <a href="" class="level1 parent">
                            <span>
                                <span class="icon" style="background-image: url('images/menu/icon_menu_features.png');background-repeat: no-repeat; background-position: top center"> 
                                </span>Administrative
                            </span>
                        </a>
                        <div class="dropdown columns1">
                            <div class="dropdown-bg" style="overflow: hidden; width: 209px; height: 202px; ">
                                <div>
                                    <div class="width100 column">
                                        <ul class="level2">
                                            <li class="level2 item200" style="width: 180px;#{PersonalInformationDataBean.pageViewData.contains('addUserss')?'display:inherit':'display:none'}">
                                                <a href="addUserss.xhtml" class="level2">
                                                    <span>Add User Account
                                                    </span>
                                                </a>
                                            </li>
                                            <li class="level2 item201" style="width: 180px;#{PersonalInformationDataBean.pageViewData.contains('logPatentSystemss')?'display:inherit':'display:none'}">
                                                <a href="logPatentSystemss.xhtml" class="level2">
                                                    <span>System Log
                                                    </span>
                                                </a>
                                            </li>
                                            <li class="level2 item202" style="width: 180px;#{PersonalInformationDataBean.pageViewData.contains('changePass')?'display:inherit':'display:none'}">
                                                <a href="changePass.xhtml" class="level2">
                                                    <span>Change Password
                                                    </span>
                                                </a>
                                            </li>
                                            <li class="level2 item203" style="width: 180px;#{PersonalInformationDataBean.pageViewData.contains('userlistss')?'display:inherit':'display:none'}">
                                                <a href="userlistss.xhtml" class="level2">
                                                    <span>Details Of Registered Users
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </nav>
        </div>
    </span>
</div>

This gives me output as below (its not same, but somewhat like this).

Home  |   Projects     |     Administrative
           |                  |
           |                  |
           |- Men 1           |- Ad 1
           |- Men 2           |- Ad 2
           |- Men 3           |- Ad 3

Now what I want to do is

  1. When Men 1 is selected, <li class="level1 item102 parent makeSpace default" should change to <li class="level1 item102 parent makeSpace active" i.e. take out default and take in active class.

  2. When I click on Ad 2, <li class="level1 item102 parent makeSpace default" should change to <li class="level1 item102 parent makeSpace active"

Any idea how to get this done? I check online, however examples I get was for Level 0 menu.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:45:40+00:00Added an answer on June 12, 2026 at 6:45 am

    What I did is is below….

    var myURL = window.location.toString();
    var endIndex = myURL.lastIndexOf(".", myURL);
    var startIndex = myURL.lastIndexOf("/")+1;
    var pageAccessed = myURL.substr(startIndex, endIndex-startIndex);
    
    if (pageAccessed=="successLoginss") {
    $(".homemenu").addClass("active");
    $(".homemenu").removeClass("default");
    }
    
    <li class="level1 item101 default homemenu">
        <a href="index.xhtml" class="level1">
            <span>
                <span class="icon" style="background-image: url('images/menu/icon_menu_home.png');background-repeat: no-repeat; background-position: top center"> 
                </span>
                Home
            </span>
        </a>
    </li>
    

    Dats it….. I know this is not right way, but I had to get done this way….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created blank Asp.Net-MVC 3 web application and want to write my own
I have created web-application using JSF 2.0 where I have many checkboxes. I want
I have created a java web application using spring. I want the users of
I have created a web application using ASP.NET MVC3, and want to display a
I have created a simple web application, for which I want all responses with
I have created a small web application in java. And now I want to
I have created a online examination web application. I want the users to avoid
I have created one web application using PHP. I want know the IP randomly
I have created a web application using Visualstudio 2008 using C# on my computer.
I have created a web application with a Silverlight project embedded in it, using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.