我编码了一个头文件,其中包含一些tabs.this头文件包含在jsps of website.in两个jsp页面选项卡不能在Internet Explorer中工作但在其他jsps中工作正常。在firefox中每个选项卡工作正常在每个jsps中。 下面是jsp的代码部分,其中包含头部。
<!-- Header Start -->
<!-- standard header bar with logo -->
<%@ include file="ssi/header1.ssi"%>
<!-- end of standard header bar with logo -->
<!-- Header End -->
头文件的标签部分显示在header1.ssi
的代码中 <div id="header">
<div class="headerInner">
<div class="logo"> </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> <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"> </div>
<%}%>
<%if ( request.isUserInRole(RoleNames.MER_GRP)){%>
<div class="tabSelected" onClick="location.href='merchant.jsp'"><div class="tabTextSelected">Merchant</div></div>
<div class="tabSpacer"> </div>
<%}%>
<%if ( request.isUserInRole(RoleNames.ADMIN)){%>
<div class="tab" onClick="location.href='Admin.jsp'"><div class="tabText">Admin</div></div>
<div class="tabSpacer"> </div>
<%}%>
<%if ( request.isUserInRole(RoleNames.CONFIG_GRP)){%>
<div class="tab" onClick="location.href='config.jsp'"><div class="tabText">Config</div></div>
<div class="tabSpacer"> </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>
答案 0 :(得分:0)
我已将“location.href”修改为“window.location.href”?现在它在两者中工作正常。但我不明白其背后的原因?