diff --git a/tomcat/webapps/Trawl/index.jsp b/tomcat/webapps/Trawl/index.jsp index d24e965ee85f5abe5277ef0938461ee32cc3cef9..42b387c67b00b06de7202793767c6bb6c6e43e85 100644 --- a/tomcat/webapps/Trawl/index.jsp +++ b/tomcat/webapps/Trawl/index.jsp @@ -21,6 +21,7 @@ Double Handle Slider Modified from: http://jqueryui.com/slider/#range <!-- MUST load JQuery Library before loading this--> <script src="script.js"></script> + <!--Fonts--> <!--Open Sans Rg-400/Semi-600/Bd-700--> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet"> @@ -33,27 +34,30 @@ Double Handle Slider Modified from: http://jqueryui.com/slider/#range </header> <span id="menu-bar"> - <a href="index.html">Non functional Menu Item 1</a> | + <a href="index.html">Item 1</a> | <a href="index.html" target="_blank">Item 2</a> </span> <section id="options"> - <section id="nameDropdownIn"> - <form method="POST" action="doBioLookup.do"> <!--.do extension is not necessary. This field is the servlet's url in web.xml--> + <section id="pickSciRanks"> + <%--<form method="POST" action="doBioLookup.do"> <!--.do extension is not necessary. This field is the servlet's url in web.xml-->--%> + <form> Phylum: - <select name="phylum" size="1" onChange="this.form.submit()"> - <option value="0">Arthropoda</option> - <option>Chordata</option> - <option>Mollusca</option> + <%--<select name="pickPhy" size="1" onChange="this.form.submit()">--%> + <select name="pickSciR" id="pickPhylum" size="1" onChange="changedSciR('phylum')"> + </select> Class: - <select name="class" size="1" onChange="alert()"> + <select name="pickSciR" id="class" size="1" onChange="changedSciR('class')"> <option>SomeClass</option> </select> Order: - <select name="order" size="1"> + <select name="order" size="1" onChange="alert()"> + <option value="00">Arthropoda</option> + <option value="01">Chordata</option> + <option value="03">Mollusca</option> </select> Family: @@ -88,7 +92,7 @@ Double Handle Slider Modified from: http://jqueryui.com/slider/#range <input type="radio" name="gender" value="female"> Histogram <input type="submit"> </form> - <form method="POST" action="> + <form method="POST" action="""> <input type="submit" value="Individual Records"> <!--To records.html--> </form> </section> @@ -98,8 +102,9 @@ Double Handle Slider Modified from: http://jqueryui.com/slider/#range <section id="outputDetails">Stuff like population count, entries found, etc. go here</section> <section id="outputBox">Map, Histogram Box</section> </section> - <footer> - Footer - </footer> + + <%--<footer>--%> + <%--Footer--%> + <%--</footer>--%> </body> </html> diff --git a/tomcat/webapps/Trawl/script.js b/tomcat/webapps/Trawl/script.js index 6aa5f6cfa23a3b1008042fae3c760e18e863f67b..438f15b87c9e9870be8278b57edda951adf2b229 100644 --- a/tomcat/webapps/Trawl/script.js +++ b/tomcat/webapps/Trawl/script.js @@ -1,3 +1,43 @@ +function init() { + initPhylum(); +} + +// Returns list of animalia children == all phylums +function initPhylum(){ + // alert("initPhylum function"); + var parentId = 2; //Animalia AphiaID = 2 + + // TODO Request + var nodeList; + // nodeList = { + // "taxonId":[1065,1821,51], + // "taxonName":["Arthropoda", "Chordata", "Mollusca"] + // }; + nodeList = { + "taxonId":[1821,51,1065], + "taxonName":["Chordata","Mollusca","Arthropoda"] + }; + + var content = "", x, y; + + for (i in nodeList.taxonId){ + x = nodeList.taxonId[i]; + y = nodeList.taxonName[i]; + content += '"<option value="' + x + '">' + y + '</option>'; + } + + document.getElementById("pickPhylum").innerHTML = content; + + // {taxid: intID} + +} + +function changedSciR(rank){ + // var changedRank = document.getElementsByName() +} + + + // For Range Slider $( function() { $( "#slider-range" ).slider({ @@ -10,4 +50,6 @@ $( function() { } }); $( "#fromtoYear" ).html($( "#slider-range" ).slider( "values", 0 ) + " - " + $( "#slider-range" ).slider( "values", 1 )) -} ); \ No newline at end of file +} ); + +window.onload=init; \ No newline at end of file diff --git a/tomcat/webapps/Trawl/style.css b/tomcat/webapps/Trawl/style.css index 86f4e88d5816a3e42c066cd9c4eab0bca5aa1f82..9e0466f2fe91582da5a7c1f4dca0f1c17c33ca28 100644 --- a/tomcat/webapps/Trawl/style.css +++ b/tomcat/webapps/Trawl/style.css @@ -31,7 +31,7 @@ a:hover{ border: 1px solid; } -#nameDropdownIn{ +#pickSci{ border: 1px solid olivedrab; }