]> git.mjollnir.org Git - moodle.git/commitdiff
chaning reference from document.abc to document.getElementById('abc'), MDL-7861
authortoyomoyo <toyomoyo>
Tue, 2 Jan 2007 05:04:11 +0000 (05:04 +0000)
committertoyomoyo <toyomoyo>
Tue, 2 Jan 2007 05:04:11 +0000 (05:04 +0000)
lib/weblib.php

index ca4bbbf0073dfdb7c3c069ed0b615bd6fc33382b..c8c9bca1895a7eb682256328c489754404f1f4d8 100644 (file)
@@ -950,14 +950,16 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
         $nothing = $choose.'...';
     }
 
+    // changed reference to document.getElementById('id_abc') instead of document.abc
+    // MDL-7861
     $startoutput = '<form action="'.$CFG->wwwroot.'/course/jumpto.php"'.
                         ' method="get"'.
                         ' target="'.$CFG->framename.'"'.
                         ' name="'.$formname.'"'.
+                        ' id="id_'.$formname.'"'.
                         ' class="popupform">';
 
-    $output = '<select name="jump" onchange="'.$targetwindow.'.location=document.'.$formname.
-                       '.jump.options[document.'.$formname.'.jump.selectedIndex].value;">'."\n";
+    $output = '<select name="jump" onchange="'.$targetwindow.'.location=document.getElementById(\'id_'.$formname.'\').jump.options[document.getElementById(\'id_'.$formname.'\').jump.selectedIndex].value;">'."\n";
 
     if ($nothing != '') {
         $output .= "   <option value=\"javascript:void(0)\">$nothing</option>\n";