Btw, the document.forms style of notation is very old-fashioned.
And, why aren't you using jQuery to make all this much simpler?
Hi, Bear. Thank you for your reply! I am actually going very old school and coding this in a text editor. I just used DirtyMarkup to clean up the code, and got several "unclosed string" errors beginning at variable r. It turns out I had either too many or too few quotation marks, and that's why the code wasn't working! Thank you for having me look for errors! The working code is as follows: