Skip to main content
Participant
April 25, 2008
Question

RoboHelp seems to break JavaScript in HTML file placed in WebHelp project

  • April 25, 2008
  • 3 replies
  • 635 views
A JavaScript that works standalone in an HTML file before it is compiled in a WebHelp project, no longer works after the WebHelp project is compiled. I don't see anything about JavaScript in the Help for RoboHelp HTML 7. The JavaScript was imported into the project automatically since it is referenced in the HTML file. The script just toggles a paragraph to collapse or expand, and upon expansion there is a different icon image that is displayed.

After the HTML file is compiled, and you click the paragraph icon to expand the paragraph, the expanded icon is not displayed.

Any help is much appreciated,
Peter
This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Known Participant
May 1, 2008
Peter,

What I've done in RHx7 HTML is copy and paste the entire script into the Script dialogue box (Insert > HTML > Advanced > Script) and placing it directly under the Source tag. This works fine for me, even though it is not space-economical (having the script in every file rather than referencing it).

The script then appears in RH as a RED BOX. You may have to tweak the location of it to get it to work exactly as you want.

To save time (but not space), I just added the script to the templates where needed. Others more savvy than me can probably tell you a fool-proof way of calling out the scripts vice embedding them. I'm even using internal frameset scripts that point to external URL's (a poor man's RSS feed).
Captiv8r
Legend
April 25, 2008
Welcome to our community, Peter

You probably need to add the image to your Baggage files folder of RoboHelp. If you aren't using it in any topic, RoboHelp is probably blissfully unaware of it.

You would also want to do the same thing with any .JS file(s) you added.

Cheers... Rick
MergeThis
Inspiring
April 28, 2008
You might also want to verify that you have placed the JS calls and links in the correct locations. Some JS solutions need the call inside the HEAD section, some recommend directly after the opening body tag or directly before the closing body tag. This can be crucial if you also have popup links, expanded text, etc. in the same topic.


Good luck,
Leon