Copy link to clipboard
Copied
DHTML drop down text - How can I make the hot spot text change from "show me" to "hide"?
Copy link to clipboard
Copied
Hi there
Normally with DHTML drop down text you simply type the text you want the user to click, then select across it and make a drop-down.
In your case, it would seem you (or someone) has typed "Show Me" as the text that is clickable?
So is your question to say that this is what you have done, but you want the behavior to somehow be that when the user clicks the text, instead of seeing "Show Me", you want it to change so that it would then read "Hide"? (until it was clicked and it would then again change to "Show Me")
I'm guessing that's possible, but it won't be a simple thing to change from inside RoboHelp. Unless, possibly you make the "text" a pair of simple images and you configure the images to be used as "Twisties".
Cheers... Rick
Copy link to clipboard
Copied
Thanks, Rick! I didn't know about twisties. On your advice I checked them out and, yeah, that's exactly what I needed!
Copy link to clipboard
Copied
Sooo, all sorted now?
Copy link to clipboard
Copied
Oh Rick, you're making this way too easy! Seriously, who wants easy if you can make it hard 😉
-- Just dropping in as this is something I did for my help projects. Perhaps someone can use it.
/* Modification */
var More = "Show me";
var Less = "Hide";
var MoreRegExp = new RegExp(More, 'g');
var LessRegExp = new RegExp(Less, 'g');
sHTML = el.innerHTML;
if(MoreRegExp.test(sHTML))
sHTML = sHTML.replace(MoreRegExp, Less);
else if(LessRegExp.test(sHTML))
sHTML = sHTML.replace(LessRegExp, More);
el.innerHTML = sHTML;
/* End modification */
Don't forget to copy the modified ehlpdhtm.js in your output after generation, or update your seed file.
Kind regards,
Willam