diff client/digitallibrary/navcat_n6.js @ 50:866e798e2bef

13.8.2002 - [different files] : roc - changed all hardcoded occurrences of /docuserver/digitallibrary to work relative or take the path from the request URL. Introduced a variable baseURL to hold the URL path (up to digilib.jsp etc.). Now it should be possible to install digilib in other directories. - removed xerces.jar. It seems not necessary any more (JDK 1.3.1, Tomcat 4.0.4)
author robcast
date Thu, 15 Aug 2002 23:40:15 +0200
parents 84a481a388bb
children cbfc008b4245
line wrap: on
line diff
--- a/client/digitallibrary/navcat_n6.js	Sun Jul 07 18:03:54 2002 +0200
+++ b/client/digitallibrary/navcat_n6.js	Thu Aug 15 23:40:15 2002 +0200
@@ -24,7 +24,7 @@
 	whichFrame.document.write('<style type="text/css">.myFont {font-family: sans-serif, Arial; font-size: 11px; color: #FFFFFF}</style>');
 	whichFrame.document.write('<script language="Javascript">');
 	whichFrame.document.write('function loadDigilib(idx) {');
-	whichFrame.document.write('linkRef = "http://' + location.host + '/docuserver/digitallibrary/digilib.html?' + parent.att[0] + '+" + idx;');
+	whichFrame.document.write('linkRef = "' + parent.baseUrl + '/digilib.jsp?' + parent.att[0] + '+" + idx;');
 	whichFrame.document.write('win = window.open(linkRef, "digilib");');
 	whichFrame.document.write('win.focus();');	
 	whichFrame.document.write('}');	
@@ -37,7 +37,7 @@
 		whichFrame.document.write('<tr>');
 		for (j = 0; j < att[3]; j++) {
 			indexNr = parseInt(att[1])+i*parseInt(att[3])+j;
-			thumb  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+			thumb  = parent.baseUrl + "/servlet/Scaler/";
 			thumb += att[0] + "?" + "pn=" + indexNr + "&ws=1.0&mo=fit&dw=" + cellWidth + "&dh=" + (cellHeight-25);
 			whichFrame.document.write('<td align="center" valign="middle" width="' + cellWidth + '" height="' + cellHeight + '" class="myFont">');
 			whichFrame.document.write('<a href="javascript:loadDigilib(' + indexNr + ')">');