changeset 331:07aac99066bf

fixed problems with Netscape4 (silly error by me partly :-)
author robcast
date Tue, 02 Nov 2004 20:36:59 +0100
parents 1ddfe4802260
children d14782908c37
files client/digitallibrary/digimage_img_inc.jsp client/digitallibrary/digimage_tbl_inc.jsp
diffstat 2 files changed, 34 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/digimage_img_inc.jsp	Tue Nov 02 20:36:59 2004 +0100
+++ b/client/digitallibrary/digimage_img_inc.jsp	Tue Nov 02 20:36:59 2004 +0100
@@ -2,12 +2,24 @@
 // retrieve objects from context
 digilib.servlet.DocumentBean docBean = (digilib.servlet.DocumentBean) pageContext.getAttribute("docBean", pageContext.REQUEST_SCOPE);
 digilib.servlet.DigilibRequest dlRequest = docBean.getRequest();
+String ua = request.getHeader("User-Agent");
+boolean isN4 = ((ua.indexOf("Mozilla/4.") > -1)&&(ua.indexOf("MSIE") == -1));
 %>
-<div id="scaler" style="position:absolute; left:10px; top:10px; visibility:visible">
+<%
+    if (isN4) {
+%><ilayer name="scaler"><%
+	    } else {
+%><div id="scaler"><%
+	    }
+%>
 <script type="text/javascript">
 var ps = bestPicSize(getElement('scaler'), 10);
-document.write('<img id="pic" src="<%=
-  dlRequest.getAsString("base.url") + "/servlet/Scaler?" + dlRequest.getAsString()
-%>&dw='+ps.width+'&dh='+ps.height+'" />');
+document.write('<img id="pic" src="<%= dlRequest.getAsString("base.url") + "/servlet/Scaler?" + dlRequest.getAsString('s') %>&dw='+ps.width+'&dh='+ps.height+'" />');
 </script>
-</div>
+<%   
+    if (isN4) {
+%></ilayer><%
+	    } else {
+%></div><%
+	    }
+%>
--- a/client/digitallibrary/digimage_tbl_inc.jsp	Tue Nov 02 20:36:59 2004 +0100
+++ b/client/digitallibrary/digimage_tbl_inc.jsp	Tue Nov 02 20:36:59 2004 +0100
@@ -2,6 +2,8 @@
 // retrieve objects from context
 digilib.servlet.DocumentBean docBean = (digilib.servlet.DocumentBean) pageContext.getAttribute("docBean", pageContext.REQUEST_SCOPE);
 digilib.servlet.DigilibRequest dlRequest = docBean.getRequest();
+String ua = request.getHeader("User-Agent");
+boolean isN4 = ((ua.indexOf("Mozilla/4.") > -1)&&(ua.indexOf("MSIE") == -1));
 %>
 <table border="0"  cellpadding="0" cellspacing="0">
   <tr>
@@ -19,15 +21,27 @@
         %><a href="javascript:moveBy(-0.5, 0)"><img src="img/left.gif" border="0" /></a><%
       }
       %></td>
-      <td>
-<div id="scaler" style="visibility:visible">
+	  <td>
+<%
+	  if(isN4) {
+	      %><ilayer name="scaler"><%
+		  } else {
+	      %><div id="scaler" style="visibility:visible"><%
+		  }
+%>
 <script type="text/javascript">
 var ps = bestPicSize(getElement('scaler'), 10);
 document.write('<img id="pic" src="<%=
   dlRequest.getAsString("base.url") + "/servlet/Scaler?" + dlRequest.getAsString('s')
 %>&dw='+ps.width+'&dh='+ps.height+'" />');
 </script>
-</div>
+<% 
+    if(isN4) {
+	%></ilayer><%
+	    } else {
+	%></div><%
+	    }
+%>
     </td>
     <td valign="center"><%
       if (docBean.canMoveRight()) {