chaning reference from document.abc to document.getElementById('abc'), MDL-7861

This commit is contained in:
toyomoyo
2007-01-02 05:04:11 +00:00
parent 759a18ddf5
commit 9d3c6ee506
+4 -2
View 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";