### Eclipse Workspace Patch 1.0 #P moodle Index: lib/scroll_to_errors.js =================================================================== RCS file: /cvsroot/moodle/moodle/lib/scroll_to_errors.js,v retrieving revision 1.1 diff -u -r1.1 scroll_to_errors.js --- lib/scroll_to_errors.js 13 Jul 2006 09:48:57 -0000 1.1 +++ lib/scroll_to_errors.js 21 Jan 2007 22:21:00 -0000 @@ -105,6 +105,7 @@ warnings[warnings.length] = continueBtn; // then add the continue button to the array var link; + var upgradeautocontinue = false; for (var i = 0; i < n; ++i) { // add a "next" link to all warnings except the last one on the page if (i < n - 1) { @@ -136,6 +137,7 @@ link = createWarningSkipLink('Scroll to the continue button', 0); p.appendChild(document.createTextNode('No warnings - ')); p.className = 'notifysuccess'; + upgradeautocontinue = true; } p.appendChild(link); contentDiv.insertBefore(p, contentDiv.firstChild); @@ -143,6 +145,9 @@ // automatically scroll to the first warning or continue button initScroll(warnings[0]); + if (upgradeautocontinue) { + document.forms[0].submit();//auto submit + } }; // load should be a document event, but most browsers use window