You need to sign in to do that
Don't have an account?
prai
scroll to top
I have created a Big VF page.
i want to add "Back to Top" link at the bottom of my VF page which, once you clicked it will take them back to top of page and cursor point to specific field.
I wrote the code:
<div align="right"> <a href="#" ID="#backToTop"> Back To Top</a> </div>
but this is returing back to top of page. but i dont know how to set the cursor position.
Please help me to get this.
Thanks.
i want to add "Back to Top" link at the bottom of my VF page which, once you clicked it will take them back to top of page and cursor point to specific field.
I wrote the code:
<div align="right"> <a href="#" ID="#backToTop"> Back To Top</a> </div>
but this is returing back to top of page. but i dont know how to set the cursor position.
Please help me to get this.
Thanks.
You have to use Script for that senario.
Let, in mine code there is 4 inputText component and i want to focuse on particular component (3rd one in them) after clicking Back to Top.
And on page load i want to focus on 1st inuptText.
so i write this code
Hope this will help you!
Regards
Virendra
All Answers
You have to use Script for that senario.
Let, in mine code there is 4 inputText component and i want to focuse on particular component (3rd one in them) after clicking Back to Top.
And on page load i want to focus on 1st inuptText.
so i write this code
Hope this will help you!
Regards
Virendra
If it does not work then you may need to give all of the parent components of your input field an Id and then use the following instead:
Remember to add the setFocus function to the onclick of your anchor tag.
More information on using $Component can be found in the documentation (https://www.salesforce.com/us/developer/docs/pages/Content/pages_best_practices_accessing_id.htm).
But If you dont use $COmponent and the full component hierarchy then its not work.
i apologies
you are right ! if he use Html tag then he can use without $Component.
Regards
Virendra
http://www.jqueryscript.net/other/Simple-Back-To-Top-Link.html