0 Replies - 637 Views - Last Post: 26 July 2017 - 02:41 AM

#1 kavithav  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 02-April 17

How to hide View Reports which is the second list item with id="Me

Posted 26 July 2017 - 02:41 AM

In my application i have three listitems File Upload,View Reorts and Change Password.I need to hide View Reports if the login is by normal user and i need to display View Reports if the login is by manager.Below is the code of my tabs

<div class="wrapper">
        <div class="menu">
             <div class="menu">
                <ul id="drop-nav">
                    <li id="MenuFileUpload" runat="server"><a href="Upload.jsp">File Upload</a>
                        <ul>
                            <li><a href="ViewUploadedFiles.jsp">View Uploaded Data</a></li>
                        </ul>
                    </li>
                     <li id="MenuReports" runat="server"><a href="Reports.jsp" id="Rpf" runat="server">View Reports</a><ul>
                         <li><a href="Reports1.jsp">Report1</a></li>
                         <li><a href="Reports2.jsp">Reports2</a></li>
                         <li><a href="Report3.jsp">Report3</a></li>
                         </ul>
                     </li>
                         <li id="lichangepwd" runat="server"><a id="A1" href="ChangePassword.jsp" runat="server">Change Password</a></li>
                    <div style="width:auto;float:right;font-weight:bold;padding-right:0cm;">
                        <li id="lilogout"><a href="Logout.jsp"> Logout</a></li></div>
                     <div style="float: left;text-align:right; width: 64%;"> 
                    <asp:Label ID="lblmsg" runat="server" ForeColor="Red" BorderColor="White" Text="Label" Font-Size="Small"></asp:Label> </div>

                </ul>

             </div>

        </div>
:code:

Below is my servlet code how to hide view reports tab based on the login

if(role.equals("Supervisor"))
   {
      response.sendRedirect("SupervisorMaster.jsp");
   }
   else if(role.equals("User"))
   {
         response.sendRedirect("SupervisorMaster.jsp");  
   }
:code:

This post has been edited by modi123_1: 26 July 2017 - 06:41 AM
Reason for edit:: In the future please use the [code] tag button in the editor.


Is This A Good Question/Topic? 0
  • +

Page 1 of 1