javascript MDL-20662 Commited patch to fix old_onload_focus, thanks Nigel for the patch :)

This commit is contained in:
Sam Hemelryk
2009-10-29 07:48:55 +00:00
parent 7f4c382ac0
commit 5f8bce506f
+1 -1
View File
@@ -1162,7 +1162,7 @@ function focuscontrol(controlid) {
* This function should be removed as soon as it is no longer used
*/
function old_onload_focus(formid, controlname) {
if (document.forms[formid]) {
if (document.forms[formid] && document.forms[formid].elements && document.forms[formid].elements[controlname]) {
document.forms[formid].elements[controlname].focus();
}
}