MCPcopy Create free account
hub / github.com/codemistic/Web-Development / showResult

Function showResult

disney-character-game/index.js:90–104  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

88resultBox.style.display = "none";
89
90function showResult(e) {
91 e.preventDefault();
92 var charSelect = document.getElementById("char-select");
93 var gameInstruct = document.getElementById("game-instruct");
94
95 resultBox.style.display = "block";
96 if (charInputField.value != "") {
97 charSelect.innerHTML = "You selected: " + charInputField.value;
98 gameInstruct.innerHTML =
99 "Now play the game to see which character is selected for you!";
100 } else {
101 charSelect.innerHTML = "Enter your favourite character!";
102 gameInstruct.innerHTML = "";
103 }
104}
105
106// Randomise character
107var randomBtn = document.getElementById("random-btn");

Callers 4

selectChar1Function · 0.70
selectChar2Function · 0.70
selectChar3Function · 0.70
selectChar4Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected