Last active
August 29, 2015 13:57
-
-
Save veltman/9500952 to your computer and use it in GitHub Desktop.
Bad.js for @brittanystoroz, circa 2008
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sndReq() { | |
chosen = false; | |
document.getElementById("choices").style.display = "none"; | |
document.getElementById("words_left").style.display = "none"; | |
document.getElementById("words_middle").style.display = "none"; | |
document.getElementById("words_right").style.display = "none"; | |
document.getElementById("playagain").style.display = "none"; | |
document.getElementById("playagain").innerHTML = ' '; | |
document.getElementById("left_inner").style.cursor = "pointer"; | |
document.getElementById("middle_inner").style.cursor = "pointer"; | |
document.getElementById("right_inner").style.cursor = "pointer"; | |
for (i = 0; i < 3; i++) { | |
//alert("top ("+ document.getElementById(choice_divs[i]).style.top + ") bottom (" + document.getElementById(choice_divs[i]).style.bottom + ")"); | |
document.getElementById(choice_divs[i]).style.top = '0px'; | |
} | |
document.getElementById("loading").style.display = "block"; | |
var urlstring = 'fetch.php'; | |
http.open('get', urlstring); | |
http.onreadystatechange = handleResponse; | |
http.send(null); | |
//randomize choice_divs | |
choice_divs.sort(function() {return 0.5 - Math.random()}); | |
document.getElementById("left_inner").style.borderColor = '#999999'; | |
document.getElementById("left_inner").style.backgroundColor = '#ffffff'; | |
document.getElementById("middle_inner").style.borderColor = '#999999'; | |
document.getElementById("middle_inner").style.backgroundColor = '#ffffff'; | |
document.getElementById("right_inner").style.borderColor = '#999999'; | |
document.getElementById("right_inner").style.backgroundColor = '#ffffff'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment