How can I make checkout page scroll to top on postbacks?
Posted: Thu Oct 08, 2009 6:24 pm
I tried adding this code to the checkout conlib head section but it didn't change anything:
Is there any way to have the page always start at the top?
Ideally, if there is a validation error, we'd want it to do the normal scroll to the validation summary and scroll to the top when there are no errors but scrolling to the top is more important.
I see there's the following code near the bottom of the page but I can't figure out how it's used. Based on some searches, I think it may be related to validation summary but it's not something I've come across before. Here's the code:
Thanks in advance.
Code: Select all
<script type="text/javascript" language="javascript">window.scrollTo(0,0)</script>
Ideally, if there is a validation error, we'd want it to do the normal scroll to the validation summary and scroll to the top when there are no errors but scrolling to the top is more important.
I see there's the following code near the bottom of the page but I can't figure out how it's used. Based on some searches, I think it may be related to validation summary but it's not something I've come across before. Here's the code:
Code: Select all
<script type="text/javascript" language="javascript">window.scrollTo=function(x,y){return true;}</script>