--- loncom/interface/loncommon.pm 2010/10/29 20:41:43 1.985 +++ loncom/interface/loncommon.pm 2010/11/14 18:53:51 1.986 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.985 2010/10/29 20:41:43 raeburn Exp $ +# $Id: loncommon.pm,v 1.986 2010/11/14 18:53:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2274,12 +2274,16 @@ function changed_text(choice,currentform } function set_auth_radio_buttons(newvalue,currentform) { + var numauthchoices = currentform.login.length; + if (typeof numauthchoices == "undefined") { + return; + } var i=0; - while (i < currentform.login.length) { + while (i < numauthchoices) { if (currentform.login[i].value == newvalue) { break; } i++; } - if (i == currentform.login.length) { + if (i == numauthchoices) { return; } current.radiovalue = newvalue;