benjam1nrk
02-16-2009, 04:48 PM
Hello Everyone,
I am using an UL to list files and directories for a file manager. Each LI item corresponds to either a file or directory. When the user clicks on a list item, the proper backend data is processed, and the class of the list item is changed to "highlighted", highlighting the item allowing the user to know which file is being modified.
The UL itself is placed in a DIV, and allowed to overflow, allowing the UL to be scrollable within a defined space. Everything works perfect, except, when a filename is clicked the page is refreshed, causing the UL to scroll back to the top. The correct item is highlighted, but if it falls below the viewable area, and needs to be scrolled to, it appears as though no file is selected.
In short, is it possible on page reload, to scroll to the specific LI item which has just been clicked? It would have its own unique ID and Class. I would like the "highlighted" item to have focus in the scrollable UL.
I hope this makes sense, Thank you for any assistance!
I am using an UL to list files and directories for a file manager. Each LI item corresponds to either a file or directory. When the user clicks on a list item, the proper backend data is processed, and the class of the list item is changed to "highlighted", highlighting the item allowing the user to know which file is being modified.
The UL itself is placed in a DIV, and allowed to overflow, allowing the UL to be scrollable within a defined space. Everything works perfect, except, when a filename is clicked the page is refreshed, causing the UL to scroll back to the top. The correct item is highlighted, but if it falls below the viewable area, and needs to be scrolled to, it appears as though no file is selected.
In short, is it possible on page reload, to scroll to the specific LI item which has just been clicked? It would have its own unique ID and Class. I would like the "highlighted" item to have focus in the scrollable UL.
I hope this makes sense, Thank you for any assistance!