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

How to export In-line Javascript to printed documentation?

Community Beginner ,
Mar 04, 2010 Mar 04, 2010

Copy link to clipboard

Copied

Hi Folks,

I am working in Robohelp 8 HTML, and have created these wonderful javascript include files that allow me to generate numbered and bulleted list instructions and insert them into my help guide pages.

Basically, the instructions are the same and repeated throughout guide.  What changes are the field names and numbering sequence.

Ah, you say, why not use snippets for this?  I do use them when the block of information is identical and needs repeating.

Well, my cleverness ended when I started to generate printed documentation and discovered that my in-line javascript inserts and my include files are ignored in the export process.

Examples:

In my HTML Robohelp document, I include a javascript file that contains my procedures and functions.  Then in the HTML document, I insert the call, surrounded by all the necessary <script> wrappers:

document.write(how_to_get_to("Manufacturing,Reports",","));

This produces something like this on the webpage:

Steps

   1. Open the main menu.

   2. Click the Manufacturing folder to expand it.

   3. Double-click the Reports menu item to open the window.

When generated to printed documentation, it is just missing.

Questions:

  1.  Anyone else having the same problem?

  2.  Any creative suggestions on how to generate printed documentation.

I already know I can print from the web page.

Thanks!!

Views

624

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

correct answers 1 Correct answer

Community Expert , Mar 04, 2010 Mar 04, 2010

If I have understood your process correctly, I would say everyone would have the problem. The javascript only runs when you open the topic in a browser. That does not happen when you generate Printed Documentation.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Votes

Translate

Translate
Community Expert ,
Mar 04, 2010 Mar 04, 2010

Copy link to clipboard

Copied

If I have understood your process correctly, I would say everyone would have the problem. The javascript only runs when you open the topic in a browser. That does not happen when you generate Printed Documentation.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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
Community Beginner ,
Mar 05, 2010 Mar 05, 2010

Copy link to clipboard

Copied

Thanks Peter,

I pretty much thought that was the case.  Now just trying to figure out a way to insert these numbered, partial lists in the middle of other lists without losing the sequence, and still having them print correctly.

For example:

  1. Here is the first sentence.
  2. This is an instruction that is repeated in a lot of places, but not necessarily the second instruction everywhere.
  3. Here is the third sentence.
  4. This is another instruction that is repeated in a lot of places, but not necessarily the fourth instruction everywhere.

Grasping at straws..

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
Community Expert ,
Mar 05, 2010 Mar 05, 2010

Copy link to clipboard

Copied

Have you tried inserting text only snippets into the numbered list? Not sure without testing.

If it doesn't work, you could create the content as user defined variables and insert them as required. That works OK.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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
Community Beginner ,
Mar 06, 2010 Mar 06, 2010

Copy link to clipboard

Copied

Hi Peter,

You know, I don't remember if I tried that.  Numbered snippets work fine if they are the ones that start with a known number, because I can always renumber the next one after the snippet.

You'll laugh about the variables, because I was just playing with that, I'll let you know how that works.

But, you gave me an idea that I can maybe lift the <OL> tags out of the snippet, and just add them on the HTML side of the page.

Sigh, it was so nice just managing about ten javascript functions, rather than creating 100 or more variables, or an extra 50 snippets.

Thanks,

I appreciate your suggestion.

Marilyn

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
Community Beginner ,
Mar 10, 2010 Mar 10, 2010

Copy link to clipboard

Copied

LATEST

Hi Peter,

Ok, well that worked.

I created a snippet with the <OL></OL> tags, and then stripped out these tags when I saved the snippet.  No space before or after.

Then when you insert the snippet in your ordered list, you have to go to the HTML side, and remove the closing </OL> tag before the snippet, and the opening <OL> tag that robohelp inserts after the snippet.

So, when you insert it looks like this:

<li class="p-BodyText"><p class="BodyText">Optional. &#160;Press the
  <span style="font-weight: bold;">Warehouse Search</span> button to
  filter the report for a specific warehouse, or leave the field empty
  to include all warehouses. &#160;</p></li>

</OL>
<?rh-placeholder type="snippet" ref="FLD-Location From To" ?>
<?rh-placeholder type="snippet" ref="FLD-Account Group From To" ?>
<?rh-placeholder type="snippet" ref="FLD-Account From To" ?>
<?rh-placeholder type="snippet" ref="FLD-Item From To" ?>

<OL Type="1">
<li class="p-BodyText"><p class="BodyText">Leave the <span style="font-weight: bold;">Material
  Code</span> field empty.</p></li>

And you change it to look like this:

<li class="p-BodyText"><p class="BodyText">Optional. &#160;Press the
  <span style="font-weight: bold;">Warehouse Search</span> button to
  filter the report for a specific warehouse, or leave the field empty
  to include all warehouses. &#160;</p></li>
<?rh-placeholder type="snippet" ref="FLD-Location From To" ?>
<?rh-placeholder type="snippet" ref="FLD-Account Group From To" ?>
<?rh-placeholder type="snippet" ref="FLD-Account From To" ?>
<?rh-placeholder type="snippet" ref="FLD-Item From To" ?>

<li class="p-BodyText"><p class="BodyText">Leave the <span style="font-weight: bold;">Material
  Code</span> field empty.</p></li>

This does translate to the printed page.  A bit more overhead than I would like. But better than managing the same content in a hundred different files.

Thanks for the brainstorm.

Marilyn.

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