Mercurial > hg > digilib
annotate client/digitallibrary/digimage_img_inc.jsp @ 475:d4d51fb8e23c ver_1_6
servlet version 1.6.0
- parsing of URL parameters accepts & and ; in addition to &
- more to come ;-)
| author | robcast |
|---|---|
| date | Mon, 20 Nov 2006 18:59:32 +0100 |
| parents | 93b9bd7cbb20 |
| children |
| rev | line source |
|---|---|
|
239
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
1 <%@ page language="java" %><% |
|
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
2 // retrieve objects from context |
|
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
3 digilib.servlet.DocumentBean docBean = (digilib.servlet.DocumentBean) pageContext.getAttribute("docBean", pageContext.REQUEST_SCOPE); |
|
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
4 digilib.servlet.DigilibRequest dlRequest = docBean.getRequest(); |
|
327
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
5 String ua = request.getHeader("User-Agent"); |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
6 boolean isN4 = ((ua.indexOf("Mozilla/4.") > -1)&&(ua.indexOf("MSIE") == -1)); |
|
239
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
7 %> |
|
327
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
8 <% |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
9 if (isN4) { |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
10 %><ilayer name="scaler"><% |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
11 } else { |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
12 %><div id="scaler"><% |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
13 } |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
14 %> |
|
239
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
15 <script type="text/javascript"> |
|
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
16 var ps = bestPicSize(getElement('scaler'), 10); |
|
327
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
17 document.write('<img id="pic" src="<%= dlRequest.getAsString("base.url") + "/servlet/Scaler?" + dlRequest.getAsString('s') %>&dw='+ps.width+'&dh='+ps.height+'" />'); |
|
239
2f4764230089
new digimage with red triangles for moving the zoomed area
robcast
parents:
diff
changeset
|
18 </script> |
|
327
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
19 <% |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
20 if (isN4) { |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
21 %></ilayer><% |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
22 } else { |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
23 %></div><% |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
24 } |
|
93b9bd7cbb20
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
239
diff
changeset
|
25 %> |
