Last modified: 2011-06-15 18:24:34 UTC
On line 119 of quiz.js we have: input[j].onclick = function() { this.form.shuffleButton.disabled = true; }; However shuffleButton is not always defined (for example, in cases where there is no shuffle button). Trying to read a property of an object, when the object is undefined throws an exception in javascript. Since this is in an event handler that doesn't do anything else, this doesn't really cause any problems, but it does give an ugly javascript error in the js console. If the code was put in a try block, or if it checked if shuffleButton existed before trying to set the disabled property of shuffleButton, this error could be avoided. I propose the code be changed to: input[j].onclick = function() { if (this.form.shuffleButton) this.form.shuffleButton.disabled = true; }; Similiar changes should also be made on line 116. Thanks, Bawolff
Created attachment 8664 [details] Suggested change I don't know it this helps, but I'm attaching the patch with the changes suggested above.
r90129