[sword-svn] r212 - trunk
scribe at crosswire.org
scribe at crosswire.org
Sat Jul 16 07:53:51 MST 2005
Author: scribe
Date: 2005-07-16 07:53:51 -0700 (Sat, 16 Jul 2005)
New Revision: 212
Modified:
trunk/swordweb.js
Log:
Added click expansion for morphology code explanations.
Modified: trunk/swordweb.js
===================================================================
--- trunk/swordweb.js 2005-07-09 16:57:09 UTC (rev 211)
+++ trunk/swordweb.js 2005-07-16 14:53:51 UTC (rev 212)
@@ -95,7 +95,7 @@
changeCSS('.'+wordnum, 'color', 'red');
}
-
+// get lemma morph and wnum for a word
var wd_strong = '';
var wd_morph = '';
var wd_wnum = '';
@@ -114,6 +114,24 @@
var curspans = new Array();
+
+function pd(extratext) {
+ b=document.getElementById("onlywlayer");
+ if (b!=null) {
+ c=document.getElementById("dm");
+ if (c!=null) {
+ xmlhttp.open("GET", "fetchdata.jsp?mod=Robinson&key="+extratext,true);
+ xmlhttp.onreadystatechange=function() {
+ if (xmlhttp.readyState==4) {
+ c.innerHTML="<br/>"+extratext+"<br/>"+xmlhttp.responseText;
+ }
+ }
+ xmlhttp.send(null);
+ }
+ }
+}
+
+
function p(mod, key, wordnum, extratext) {
/* check for aliases */
@@ -136,7 +154,7 @@
xmlhttp.open("GET", "fetchdata.jsp?mod="+mod+"&key="+key,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
- b.innerHTML=xmlhttp.responseText + "<br/>"+extratext;
+ b.innerHTML=xmlhttp.responseText + "<br/>"+"<div id=\"dm\"><a href=\"#\" onclick=\"pd('"+extratext+"')\">"+extratext+"</a></div>";
showhide("onlywlayer", "visible");
lastword = wordnum;
}
More information about the sword-cvs
mailing list