--- loncom/interface/loncommon.pm 2010/11/09 21:18:16 1.948.2.12 +++ loncom/interface/loncommon.pm 2010/11/17 20:41:53 1.948.2.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.948.2.12 2010/11/09 21:18:16 raeburn Exp $ +# $Id: loncommon.pm,v 1.948.2.13 2010/11/17 20:41:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2284,12 +2284,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;