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

Visualforce - same page reference and scrolls

Hi All,


Can someone please help me with some example - I need to implement typical Q&A - when user clicks on question(hyperlink) he is scrolled down to the answers section. From the answers section he clicks on Top (hyperlink next to that answer) and brought back to the question he clicked on.


In HTML we can do it using anchor tab but then the values for the names should be static. But here the questions and answers are taken from an sObject and it can have any number of values.


Really appreciate any help.




You can use your Answers or Questions object IDs as unique reference. 


You can also create a counter (integer) in your controller and use something like "Answer{!counter}" as ID.


Regards ;)