From efa4a8854914a18ec7668faf922a7dd61ae26a65 Mon Sep 17 00:00:00 2001
From: Schankula Christopher <schankuc@mcmaster.ca>
Date: Thu, 29 Mar 2018 12:36:10 -0400
Subject: [PATCH] bioresult and Javascript are working together now

---
 tomcat/webapps/Trawl/bioresult.jsp | 2 +-
 tomcat/webapps/Trawl/script.js     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tomcat/webapps/Trawl/bioresult.jsp b/tomcat/webapps/Trawl/bioresult.jsp
index cc2a416..36460f3 100644
--- a/tomcat/webapps/Trawl/bioresult.jsp
+++ b/tomcat/webapps/Trawl/bioresult.jsp
@@ -8,7 +8,7 @@
 	JSONParser parser = new JSONParser();
 	JSONObject req = (JSONObject) parser.parse(request.getReader().readLine());
 	
-	Integer taxonId = (int) (long) req.get("taxid");
+	Integer taxonId = (int) (long) req.get("taxId");
 	//System.out.println(taxonId);
 	ArrayList<TaxonNode> txNodes = ((ArrayList<TaxonNode>) te.getTaxonRecord(taxonId).getChildren());
 	TaxonNode[] txNodesAr = txNodes.toArray(new TaxonNode[txNodes.size()]);
diff --git a/tomcat/webapps/Trawl/script.js b/tomcat/webapps/Trawl/script.js
index 95d072e..ac89018 100644
--- a/tomcat/webapps/Trawl/script.js
+++ b/tomcat/webapps/Trawl/script.js
@@ -17,8 +17,8 @@ function initPickPhylum(){
 // taxID = id of parent of the thing that changes
 function updateSciR(tagID, object) {
     var path = 'doBioLookup.do';
-    var taxID = object.value;
-    alert("Updating: " + tagID + "with children of: " + taxID);   //TODO Remove me
+    var taxID = Number(object.value);
+   // alert("Updating: " + tagID + "with children of: " + taxID);   //TODO Remove me
     var params = { taxId: taxID};
     var xhr = new XMLHttpRequest();
     xhr.open("POST", path);
-- 
GitLab