Created
March 21, 2012 20:11
-
-
Save mreidsma/2152334 to your computer and use it in GitHub Desktop.
Randomize the confirmation message displayed after form submission
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
// Have a span with the id of feedback-thanks in your document. | |
var ran1 = ["Thank you! Your feedback is important to us.","Thanks! Your feedback helps us find the best tools for you.","Thank you! Your feedback helps everyone doing research at GVSU."]; | |
var randomNum = Math.ceil(Math.random()*3); /* Pick random number between 1 and 3 */ | |
document.getElementById("feedback-thanks").innerHTML = ran1[randomNum]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment