Auto Scroll to top of new page?

arathra
arathra
  • arathra
  • 7 months ago
I am using the quiz module. When a user clicks on the FINISH button I have used this snippet of code in responses.php so that the page auto scrolls (jumps) to the top of the page where I have the answers showing at the top:

<script type="text/javascript">
scroll(0,300);
</script>


But unfortunately this only works on the results page.

Is there a way I can add this code (or something similar with the same function) so that whenever the CONTINUE button is clicked, the next page which appears is automatically scrolled up to near the top?

(The problem is that when I have a whole bunch of questions, when a new page loads the browser remains scrolled down to the bottom.)
Access to viewing replies is restricted.
Showing 1 of 1 replies
You do not have permissions for replying to this topic.
Loading...
Confirm delete? This action is irreversible and the data will be deleted permanently. Do you want to continue? Confirm Add New Delete Unpublish Cancel Import Uninstall The selected item successfully deleted.
Shondalai