function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MyGodItsColdMyGodItsCold 

Return to top - after Save - from within edit, from apex:detail

I have a VF page which includes: apex:detail. The VF page overrides the View function.

 

When the user scrolls to a section, does an inline Edit,  then does a Save - the system returns the user to the Save button scroll position.

 

I want the user returned to top of page. This is how it works when there is no override of vf page with embedded apex:detail tag. Because we have "Snapshot" info at the top of the form, this is a nice side effect that we have lost.

 

Is writing a Save method in the controller an option? If so, how would I say 'go to top' prior to issuing the update command?

 

Tia,

 

 

 

 

Maros SitkoMaros Sitko

I am not sure, but try add this after apex:detail

 

<script>
$j('input[name$="save"]').click(function(){
window.scrollTo(0, 0);
});
</script>

 


and you need add jquery into your VFpage

MyGodItsColdMyGodItsCold

Thanks for the suggestion, but it does not have any effect. After the Save button is clicked, it does not reposition the scroll to "Top".

 

Perhaps I should dive into an Override of Save ???