[sword-svn] r210 - trunk

scribe at crosswire.org scribe at crosswire.org
Sun May 15 03:10:01 MST 2005


Author: scribe
Date: 2005-05-15 03:10:00 -0700 (Sun, 15 May 2005)
New Revision: 210

Modified:
   trunk/swordweb.js
Log:
Fixes for sucky IE


Modified: trunk/swordweb.js
===================================================================
--- trunk/swordweb.js	2005-05-15 05:03:53 UTC (rev 209)
+++ trunk/swordweb.js	2005-05-15 10:10:00 UTC (rev 210)
@@ -149,11 +149,14 @@
 			}
 			curspans.length = 0;
 			for (i = 0; i < spans.length; i++) {
-				oc = spans[i].getAttribute('onclick');
-				if (oc) {
-					fe = oc.indexOf('(');
-					if (fe > 0) {
-						wdata = eval('wd'+oc.substring(fe, oc.length));
+				ocf = spans[i].getAttribute('onclick');
+				if (ocf) {
+					oc = ocf.toString();
+					fb = oc.indexOf('p(');
+					if (fb >= 0) {
+						fe = oc.indexOf(')', fb);
+						wdf = 'wd'+oc.substring(fb+1, fe+1);
+						wdata = eval(wdf);
 						if (wd_wnum == wordnum) {
 							curspans[curspans.length] = spans[i];
 							spans[i].className='curWord';
@@ -181,7 +184,7 @@
 	var l = document.getElementById(layer);
 	if (vis == "visible") {
 		winW = isNS4 ? window.innerWidth-16 : document.body.offsetWidth-20;
-		winH = isNS4 ? window.innerHeight : document.body.offsetHeight;
+		winH = (window.innerHeight) ? window.innerHeight : document.body.offsetHeight;
 		var cx = mouseDocX + 10;
 		var cy = mouseDocY - 10;
 		if (cx + 200 > winW)
@@ -191,9 +194,9 @@
 			cy = cy + 20;
 		}
 
-//		alert('window.innerHeight:'+window.innerHeight+'mouseClientY:'+mouseClientY);
+//		alert('winH:'+winH+'mouseClientY:'+mouseClientY);
 		// adjust for above or below verse
-		if (mouseClientY < (window.innerHeight/2))
+		if (mouseClientY < (winH/2))
 			cy = cy + 50;
 		else cy = cy - (l.clientHeight + 50);
 



More information about the sword-cvs mailing list