MDL-8062 Remove name attribute from <form> and related javascript code cleanup (tested with FF, IE, Konq and Opera)

This commit is contained in:
skodak 2007-01-06 19:22:58 +00:00
parent ee7f231d08
commit d2ce367fb9
38 changed files with 135 additions and 125 deletions

View file

@ -858,15 +858,15 @@ class assignment_base {
echo '<script type="text/javascript">'."\n";
echo 'function setNext(){'."\n";
echo 'document.submitform.mode.value=\'next\';'."\n";
echo 'document.submitform.userid.value="'.$nextid.'";'."\n";
echo 'getElementById(\'submitform\').mode.value=\'next\';'."\n";
echo 'getElementById(\'submitform\').userid.value="'.$nextid.'";'."\n";
echo '}'."\n";
echo 'function saveNext(){'."\n";
echo 'document.submitform.mode.value=\'saveandnext\';'."\n";
echo 'document.submitform.userid.value="'.$nextid.'";'."\n";
echo 'document.submitform.saveuserid.value="'.$userid.'";'."\n";
echo 'document.submitform.menuindex.value = document.submitform.grade.selectedIndex;'."\n";
echo 'getElementById(\'submitform\').mode.value=\'saveandnext\';'."\n";
echo 'getElementById(\'submitform\').userid.value="'.$nextid.'";'."\n";
echo 'getElementById(\'submitform\').saveuserid.value="'.$userid.'";'."\n";
echo 'getElementById(\'submitform\').menuindex.value = getElementById(\'submitform\').grade.selectedIndex;'."\n";
echo '}'."\n";
echo '</script>'."\n";
@ -922,7 +922,7 @@ class assignment_base {
///Print Buttons in Single View
echo '<div class="buttons" align="center">';
echo '<input type="submit" name="submit" value="'.get_string('savechanges').'" onclick = "document.submitform.menuindex.value = document.submitform.grade.selectedIndex" />';
echo '<input type="submit" name="submit" value="'.get_string('savechanges').'" onclick = "getElementById(\'submitform\').menuindex.value = getElementById(\'submitform\').grade.selectedIndex" />';
echo '<input type="submit" name="cancel" value="'.get_string('cancel').'" />';
//if there are more to be graded.
if ($nextid) {

View file

@ -37,7 +37,7 @@
//]]>
</script>
<form name="form" method="post" action="../mod/assignment/details.php">
<form id="form" method="post" action="../mod/assignment/details.php">
<table cellpadding="5">
<tr valign="top">
<td align="right"><b><?php print_string("assignmentname", "assignment") ?>:</b></td>