アニメーションを処理するために、javascript で複数の惑星オブジェクトを作成しています。
アニメーションは各惑星で正常に動作しますが、IE 6/7 で「15 文字 2 行目にオブジェクトが必要です」というエラーが表示されます。
コード:
var earthObj = null;
var mercObj = null;
var jupiObj = null;
var animate;
function init()
{
mercObj = document.getElementById('mercury');
earthObj = document.getElementById('earth');
jupiObj = document.getElementById('jupiter');
mercObj.style.position= 'relative';
mercObj.style.left = '54px';
mercObj.style.visibility = 'hidden';
earthObj.style.position= 'relative'; //error on this line
earthObj.style.left = '80px';
earthObj.style.top = 300px';
}