Originally Posted by Old Pedant
Learn to use a debugger!
First step out of the box, using F12 on your page, I get a syntax error on line 37. Which is:
pic.onmouseout = doMouseOut:
You have a COLON there, where a SEMICOLON is needed.
Fix that one error and it works.
If you haven't learned to use a debugger, it's past time. Just hit the F12 key in your browser (for Chrome or MSIE 8+) and look at the CONSOLE tab to see your errors. After that, you can start to learn all the really powerful features of the various JS debuggers. I prefer Chrome's, but any of them will do.
My last reply ended up taking nearly a week to get approved for posting, so I went ahead and just did the project the way I originally planned:
Chrome/Safari version: http://www.tigerhawkt3.com/dviice/dv...omesafari.html
Any browser: http://www.tigerhawkt3.com/dviice/dv...atibility.html
I've already gotten a request for a new feature. Someone suggested that I add a way to choose the key of the harmonica, and I thought perhaps I could also swap the other instruments as well. I'm going to use the set content feature in jquery, with .html. However, that would run into the problem of each "document.getElementById" element needing to be both unique and present (if an element isn't there, the function stops - maybe there's a way to get it to ignore failures and continue through the rest of the function, but I don't know it). So this proper way of doing things will come in very handy.
TL;DR: Thank you! I will use that.