bug 301471 - error pages should have 'Try Again' button focused. r=biesi sr=bz

git-svn-id: svn://10.0.0.236/trunk@178533 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jruderman%hmc.edu
2005-08-21 05:17:26 +00:00
parent 2dee85e178
commit 5e8b511374

View File

@@ -158,6 +158,16 @@
var ld = document.getElementById("errorLongDesc");
if (ld)
ld.innerHTML = parseFakeTags(errorDesc[err]);
// Focus the Try Again button. We can't just do this inline because of
// bug 232004. We can't use onload (see comment below). Since the
// <script> that calls initPage is the last DOM node in the document,
// a setTimeout of 0 should work.
setTimeout(function(){
var tryAgainButton = document.getElementById("errorTryAgain");
if (tryAgainButton)
tryAgainButton.focus();
}, 0);
}
]]></script>
</head>