Question

i coded a header file which includes some of tabs.this header file is include in jsps of website.in two jsp pages tabs are not working in internet explore but in other jsps its working fine.in firefox each tabs are working fine in each jsps. below is code section of jsp in which header is included.

    <!-- Header Start -->

    <!-- standard header bar with logo -->
    <%@ include file="ssi/header1.ssi"%>
    <!-- end of standard header bar with logo -->

 <!-- Header End -->

header file 's tabs section is shown below in code of header1.ssi

  <div id="header">
<div class="headerInner">
    <div class="logo">&nbsp;</div>
    <div class="userDetails">
        <% {

             if(session.getAttribute("usermanagement")==null){
                  headerObj= headerCtx.lookup("UserManagementJNDI");
                  headerHome=(UserManagementHome)PortableRemoteObject.narrow(headerObj,UserManagementHome.class);
                  session.setAttribute("usermanagement",headerHome);
                }
             else
                  headerHome=(UserManagementHome)session.getAttribute("usermanagement");

              headerUser= headerHome.create();


        %>
        Welcome <b><%=operatorId%></b> &nbsp;&nbsp; <a href="http://www.drivetrackplus.com" target="_blank">[Home]</a>  |  <a href="logout.jsp">[Logout]</a>
        <br>

        <%}%>
        <%=(headerUser.getHierarchy(operatorId)!=null && !((headerUser.getHierarchy(operatorId)).equals(""))&& !((headerUser.getHierarchy(operatorId)).endsWith("null")))?headerUser.getHierarchy(operatorId):"" %>

    </div>
    <div class="clear"></div>

    <div id="tabs">
        <% if ( request.isUserInRole(RoleNames.CORP_GRP)){%>
        <div class="tab" onClick="location.href='Corporate.jsp'"><div class="tabText">Customer</div></div>
        <div class="tabSpacer">&nbsp;</div>
        <%}%>

        <%if ( request.isUserInRole(RoleNames.MER_GRP)){%>
        <div class="tabSelected" onClick="location.href='merchant.jsp'"><div class="tabTextSelected">Merchant</div></div>
        <div class="tabSpacer">&nbsp;</div>
        <%}%>

        <%if ( request.isUserInRole(RoleNames.ADMIN)){%>
        <div class="tab" onClick="location.href='Admin.jsp'"><div class="tabText">Admin</div></div>
        <div class="tabSpacer">&nbsp;</div>
        <%}%>

        <%if ( request.isUserInRole(RoleNames.CONFIG_GRP)){%>
        <div class="tab" onClick="location.href='config.jsp'"><div class="tabText">Config</div></div>
        <div class="tabSpacer">&nbsp;</div>
        <%}%>

        <% if (request.isUserInRole(RoleNames.INTERFACE_GRP) || request.isUserInRole(RoleNames.CMS_UPLOAD ) ||request.isUserInRole(RoleNames.CMS_DOWNLOAD ) || request.isUserInRole(RoleNames.LPM_INTERFACE ) || request.isUserInRole(RoleNames.ICICI_MP_INTERFACE) || request.isUserInRole(RoleNames.ICICI_MR_INTERFACE) || request.isUserInRole(RoleNames.CALL_REG_INTERFACE)){%>
        <div class="tab" onClick="location.href='Interfaces.jsp'"><div class="tabText">Interfaces</div></div>
        <div class="clear"></div>
        <%}%>
    </div>
</div>
    </div>
Was it helpful?

Solution

i have modified "location.href" to "window.location.href"?now its working fine in both.but i don't understand reason behind it?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top