James Hurrell
2009-06-05 18:05:17 UTC
I maintain a set of CHM files for a company and recently I was asked to
implement some collapsible sections in various HTML pages to make it
easier to read - the page has a lot of text on it and creating a few
collapsible subsections helps break it up.
To do this, I've used a simple .js file and by default all sections are
collapsed when the page is first opened. It all works fine, apart from
when it comes to using the built in CHM search function. If a search
string is identified within a collapsed section, the CHM will correctly
flag that the page contains the string, but it will not highlight the
string - which is kind of annoying. If the search string is outside a
collapsible section, then it is highlighted correctly.
Does anyone have a workaround for this? Maybe the .js I'm using isn't
great... Short of forcing the collapsible sections to be pre-expanded
when a page is opened, I can't think of anything else I could do. Any
help much appreciated.
implement some collapsible sections in various HTML pages to make it
easier to read - the page has a lot of text on it and creating a few
collapsible subsections helps break it up.
To do this, I've used a simple .js file and by default all sections are
collapsed when the page is first opened. It all works fine, apart from
when it comes to using the built in CHM search function. If a search
string is identified within a collapsed section, the CHM will correctly
flag that the page contains the string, but it will not highlight the
string - which is kind of annoying. If the search string is outside a
collapsible section, then it is highlighted correctly.
Does anyone have a workaround for this? Maybe the .js I'm using isn't
great... Short of forcing the collapsible sections to be pre-expanded
when a page is opened, I can't think of anything else I could do. Any
help much appreciated.