I have some JavaScript that works fine in IE and Opera, but not Firefox. The issue seems to be that Firefox is seeing the variable as undefined. Your problem is that you're using document.all, and ...
JavaScriptの変数について基礎から学ぶ入門動画です。var・let・constの特徴や違い、どの場面で使い分けるべきかをわかりやすく解説します。