function refreshDisplay() { // Grab the division buttons by their name var divisionButtons = document.getElementsByName("division"); var currentDivision = ""; // Loop through the division buttons and see which one is checked // Set the current division to that option for (var i = 0; i < divisionButtons.length; i++) { if (divisionButtons[i].checked) { currentDivision = divisionButtons[i].value; } } // If we set 'years' to all, then we should show all months too. // This is effectively a "show all" setting if (document.getElementById("year").value == "all") { document.getElementById("month").value = "all"; } // Grab the current division from the page document.getElementById("divisionDisplay").innerHTML = currentDivision; var html = ""; // placeholder for webpage var image = ""; //get trophy image html += "
"; // Based on the selected division, show some results if (currentDivision == "open") { image = "/assets/trophy_open.png"; html += "

\""Open\""

"; html += "

Max Rank: Plat 3

" } else if (currentDivision == "intermediate") { image = "/assets/trophy_intermediate.png"; html += "

\""Intermediate\""

"; html += "

Max Rank: Champ 3

" } else if (currentDivision == "main") { image = "/assets/trophy_main.png"; html += "

\""Main\""

"; html += "

Max Rank: SSL

" } html += "

Top 10 Winners

" html += "
"; html += ""; html += "
"; // TODO; // CREATE OUTPUT DISPLAY document.getElementById("divisionDisplay").innerHTML = html; }