RootsWeb.com Mailing Lists
Total: 1/1
    1. Re: [FreeHelp] Sorting tables re-visited
    2. Barry Carlson
    3. On Wednesday, December 08, 2010 10:45 AM (UTC+13) Charles Dobie wrote:- > Barry, > > Many thanks for your help in getting rid of the Rootsweb banners in > the pop-up windows. > I have another request for my page at > <http://freepages.military.rootsweb.ancestry.com/~cdobie/hmcs-niobe-1911-crewlist.htm>http://freepages.military.rootsweb.ancestry.com/~cdobie/hmcs-niobe-1911-crewlist.htm > > Would it be possible to activate the sort when the user clicks on a > cell within the table? > > Sorting re-sets the lines back to the top of the table, but it is a > long table, so the user would probably have to scroll back down to > the area of interest. For example, if the user finds a name of > interest such as "McDonald", they might want to find out if there are > others of the same name. Click on "McDonald" and have the table > sorted on the "Name" field, but still present the original "McDonald" > line in the same place so no scrolling is required. > --------------------- Charles, Effectively what you are asking is to - (1) create a sortable instruction based on clicking a name cell, and (2) create an #anchor on that row, with (3) the page then sorting and scrolling back to the anchor point. There are some difficulties - (a) the current sortable function is initiated by input to the header, and (b) that will need to be supplemented by a javascript onclick function which will trigger the function mentioned in (a), which (c) will take some time to develop and check. So, not impossible, the simplest thing is dynamically creating the #anchor, and the hardest is initiating a sort as described in (b). If it can wait until the New Year, I might have some time to play with it. Barry

    12/08/2010 06:35:17