diff --git a/tomcat/webapps/Trawl/index.jsp b/tomcat/webapps/Trawl/index.jsp index 5b77d487bca73fcaa7bdfc5474cfe67234333762..d01909bce750b7ca458ee51cb98bed18dbf6c14d 100644 --- a/tomcat/webapps/Trawl/index.jsp +++ b/tomcat/webapps/Trawl/index.jsp @@ -55,7 +55,7 @@ Double Handle Slider Modified from: http://jqueryui.com/slider/#range Genus: <select name="pickSciR" id="pickGenus" size="1" onChange="callUpdateSci(this)"><!--Dynamically Filled--></select> Species: - <select name="pickSciR" id="pickSpecies" size="1" onChange="alert('No function atm')"><!--Dynamically Filled--></select> + <select name="pickSciR" id="pickSpecies" size="1"><!--Dynamically Filled--></select> </section> <section id="yearIn"> diff --git a/tomcat/webapps/Trawl/infoGenerator.js b/tomcat/webapps/Trawl/infoGenerator.js index 450b8e8f12df5f5ba872192e006a678d8797640c..f4cad2e091e0333a76e38a31865e0d5ffc71a52c 100644 --- a/tomcat/webapps/Trawl/infoGenerator.js +++ b/tomcat/webapps/Trawl/infoGenerator.js @@ -1,3 +1,39 @@ + +function findMonth(month){ + switch(month){ + case 1: + return "January"; + case 2: + return "February"; + case 3: + return "March"; + case 4: + return "April"; + case 5: + return "May"; + case 6: + return "June"; + case 7: + return "July"; + case 8: + return "August"; + case 9: + return "September"; + case 10: + return "October"; + case 11: + return "November"; + case 12: + return "December"; + + } + + +} + + + + /** * Generates html text to fill info windows on a Google Maps API * @param names String array of scientific fish names @@ -5,6 +41,7 @@ * @param count Integer array of counts of each fish species * @returns String array where each entry is html code to describe a marker on a map */ + function infoGenerator(names, dates, count){ var infoArray =[]; @@ -12,7 +49,7 @@ function infoGenerator(names, dates, count){ for (int i=0; i < names.length; i++){ // Initialize variables to each data point's information var year = dates[i][0]; - var month = dates[i][1]; + var month = findMonth(dates[i][1]); var day = dates[i][2]; var name = names[i]; var count = count[i];