• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

DHTML drop down text hot spot behavior

New Here ,
Feb 22, 2015 Feb 22, 2015

Copy link to clipboard

Copied

DHTML drop down text - How can I make the hot spot text change from "show me" to "hide"?

Views

185

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 22, 2015 Feb 22, 2015

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 22, 2015 Feb 22, 2015

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 22, 2015 Feb 22, 2015

Copy link to clipboard

Copied

Sooo, all sorted now?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 23, 2015 Feb 23, 2015

Copy link to clipboard

Copied

LATEST

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.

  1. Open up ehlpdhtm.js.
  2. Find the function TextPopup (Line 2514 in RH11)
  3. Add the following code on a new line before the code 'for(var i=0; i<getChildNodes(el).length; i++)'

/* 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp