Which newer twisty method are you referring to? If you refer to my twisty script, updating may indeed prove a bit of a pain, so to speak. It isn't made with backward compatibility in mind.
Some of the old twisty methods stopped working, but those scripts have been updated. Are they broken again?
First off, mez apologe, RH8.0.2, WindowsXP 32 SP3.
Older twisty code:
onfocus="this.blur()" id="a1" style="position: relative;">
<img src="../image/plus_sign.gif" name="dropdown1" alt="click to expand" title="click to expand" id="dropdown1"
style="border: none; margin-right: 10px;" width="11" height="11" border="0" />Analysis & Synthesis Settings Report</a></p>
Newer twisty code (which may well be yours Willem):
style="position: relative;"><img class="TwistyImage" alt="Collapse"
display: none;" width="11"
height="11" border="0" />
<img class="TwistyImage" alt="Expand" src="../image/plus_sign.gif" style="border: none;
margin-right: 10px;" width="11" height="11" border="0" />GXB Behavior
I can dig around on grainge.org and look for solutions there. I see that there's a section on twisties with sample projects and the li,e. We've been using showhide_twisty.js for years. I guess I need to get with the program!
Have you investigated FAR's Define Substring use of variables? That is, you can identify start and end strings, then identify the substring that you want to maintain as a variable within changed or new start and/or end strings.
For example, say you want to change all <h1></h1> tags to <h2 class=BBB></h2> tags while, of course, maintaining each topic's original h1 heading text.
This will replace all instances of <h1>MyHeading</h1> with <h2 class=BBB>MyHeading</h2>. Of course, I don't know what your original code is, but you might need to do this in two stages instead of one, depending on the complexity of that code and what you want it changed into.
Although I doubt that you would be confident enough to instruct FAR to Replace All (I know I wouldn't), you could certainly step through each instance quite quickly.
It has been a few months since I experimented with FAR (everything was working then, so it wasn't deemed
an effective use of my time), and I did have to use some ofthe advaced features. My recollection of experimenting in an offline project was that the twisty code was updated cosmetically but then failed to work(?). Perhaps I'll give it another go.
Which version of FAR is that?
The latest version of the twisty scripts that I know exist, are available on http://www.grainge.org/pages/authoring/twisty/twisty.htm
I do believe that migrating to the TS Paul method or my method should be possible. Be sure to check out the RH scripting tool. If you can script in Perl, you can surely master the power of the RH scripting tool.
I wasn't doing the perl scripting, and that resource has since been reallocated. I've been meaning to learn perl, but alas, time is fleeting.
Thanks, I'll check out the page you refer too. If I can update the .js file to something that works with both the old and new twisty code, that would be best.
I puttered around with Willam's showhide.js and twisty_rev.js files in a test project with little success. I was able to install an older version of Firefox 3.6.8 that at least allows the Show/Hide buttons to work. We're approaching a production deadline, so I won't be able to explore this much further until after we release.
On an interesting side note, the projects I'm working in are ones I inherited from Jesse Brossard (the fellow mentioned with Lewis Gault in the credits of one of Peter's update pages.)
More information on this. I checked our published webhelp with the Firefox 4 beta, and the results are not encouraging. Twistys don't seem to work at all, or with very limited functionality (I tested the original twisty format and the TSPaul format). Twistys in the merged TOC are dead as well.
Are only the twisties broken? How about TOC, Index and search? FF4 is in beta and changing a script now may be a waste of time as a new beta may break the updated script. I'd wait for the FF4 release before worrying.
Actually, I think it would be more productive for Adobe to work with Mozilla to fix this issue. To paraphrase Leonard "Bones" McCoy, "Dammit Jim! I'm a technical writer, not a software engineer!"
I totally understand wanting things to "just work", but I'm failing to see how the onus is on Adobe here? Unless I misunderstood, you are using a separately developed script from independent sources for this.
Now I do know the onus is on folks like Adobe to produce functional output for all the major browsers. But it seems a bit odd that something works fine in version x of a browser. The browser manufacturer creates version y and suddenly things break. So we all start screaming at Adobe when it breaks. Why don't we scream at the browser maker? After all, things worked until they "enhanced" the browser, no?
Just musing out loud... Rick
Helpful and Handy Links
When I report that FireFox 4 breaks merged webhelp, I'm trying to warn the tech comms community that there may be a looming problem, and that it behooves us to investigate and prepare.