0

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>
1
  • i have modified "location.href" to "window.location.href"?now its working fine in both.but i don't understand reason behind it?
    – Maddy.Shik
    Sep 10, 2009 at 5:48

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.