CSH: What am I missing

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

CSH: What am I missing

Post by chuck_agari »

I'm trying to build a demo for our developers. I created a basic web page to show off various ways that (HTML5) help can be called, intending to recommend Javascript. But the two instances I have, one does not work at all, and one opens the help system, but does not go to the identified topic.

I have added header and alias files to the help system.

Here's the code in the test HTML file:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Agari Help Test Page</title>
    <script type="text/javascript" src="Agari_Enterprise_Protect_Help/csh.js"></script>.
  </head>
  <body>
    <h1>Agari Help Test Page</h1>
    <table cellspacing="2" cellpadding="2" width="100%" border="1">
      <tbody>
        <tr>
          <th>Click this... </th>
          <th>To... </th>
        </tr>
        <tr>
          <td valign="top"><input value="Open Help System" onclick-="" k="MadCap.OpenHelp(1025, null, null, null );" type="button">
          </td>
          <td valign="top">Just open Enterprise Protect help, via
            Javascript.<br>
          </td>
        </tr>
        <tr>
          <td valign="top"><a
              href="Agari_Enterprise_Protect_Help/Default.htm#cshid=[1025]">Open
              Help System</a><br>
          </td>
          <td valign="top">Just open Enterprise Protect help, via link.<br>
          </td>
        </tr>
The test file is in the root of the output folder, so each of the outputs I'm building is in a folder, so the path to the Javascript shoudl be right. (I'm using the MC instructions: https://help.madcapsoftware.com/flare20 ... -HTML5.htm.)

For the Javascript call, I tried using both the ID name and value of a topic I knew I had in the alias file. Neither worked.

The MC instructions say "Provide the developer with the output files, as well as the CSH header file. " Yet nowhere can I find instructions anywhere about what developers should do with the header file. I'm guessing this may be a stumbling point, but I'm not sure why. If I'm passing a value to a function, and that function (presumably) has access to the aliases in the built output, I'm not sure what else is necessary.

That said, I don't know why the direct link isn't going to the topic I designate. The help system opens on the home page.

If it is a missing header file in the "code," I did a bit of a search to see if I could add a script tag in the header with a line to import the header file, but couldn't find anything relevant that would explain how. Then again, I don't see anything in the output that I could refer to. The closest files are in the Resources/Data folder, Alias.jx and Alias.xml, but these have no content, only references to something that I can't figure out how to find.

Also, I'm curious: I know that default.htm is the help system's home page (why it's not index.html is a pretty dumb choice, BTW), but what is default.CSH.htm? Is that an additional file that Flare builds and uses when CSH is added to a project?
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: CSH: What am I missing

Post by chuck_agari »

More info: I found this: https://help.madcapsoftware.com/flare20 ... r-File.htm

This confuses me more than enlightens me. Apparently, Flare outputs header file types for C/C++, Visual Basic(!), Java, and Delphi Pascal(!!!). Nothing seems appropriate for--or addresses even--web applications that are built with modern-day languages.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: CSH: What am I missing

Post by NorthEast »

Ok, have you checked your code?

For the javascript link, the code for the onclick looks a bit mangled.

Code: Select all

<input value="Open Help System" onclick-="" k="MadCap.OpenHelp(1025, null, null, null );" type="button">
For the URL link, the value shouldn't be inside square brackets [] - although I can see why you'd think that from Flare's help.

Code: Select all

<a href="Agari_Enterprise_Protect_Help/Default.htm#cshid=[1025]">

The developer doesn't need the CSH header file. You just need to set up the CSH calls in your application, using the javascript or URL method.
The header file is basically just giving them a list of all the identifier names and values (to use in the CSH calls), but the file itself is not used for anything (or at least not in any projects I've worked with).
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: CSH: What am I missing

Post by chuck_agari »

Yes! Thank you. A second set of eyes is so incredibly valuable. One of the issues of being a lone writer....

I actually found the brackets issue already. And what's weird is that I thought I had copied the Javascript call and pasted it into my code ,so I wonder how I managed to mangle it. It all works--now that I disabled the popup blockers for the page.

And that info about what the developer actually needs from a header file, well gee, shouldn't that be in the product documentation?
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: CSH: What am I missing

Post by NorthEast »

chuck_agari wrote:And that info about what the developer actually needs from a header file, well gee, shouldn't that be in the product documentation?
I may be wrong - perhaps there is a workflow where developers can directly consume the header file for something, but it's not something I've ever come across.

I've had developers provide me with a header file, but not the other way round.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: CSH: What am I missing

Post by chuck_agari »

Dave Lee wrote:
chuck_agari wrote:And that info about what the developer actually needs from a header file, well gee, shouldn't that be in the product documentation?
I may be wrong - perhaps there is a workflow where developers can directly consume the header file for something, but it's not something I've ever come across.

I've had developers provide me with a header file, but not the other way round.
I'm thinking that in the world of web development, for web applications, there's not really the notion of headers files. Or alias files. JSON, yes, key-value pairs, URI encoding, etc., yes.

I'm thinking also I should just take the list I generate and create an internal reference page in Confluence that developers can reference anytime they need to link a page in the app to a help topic.

While I'm on the subject, while .properties files might work for Android apps (generally built in Java), MadCap is totally leaving out the iOS world.
Post Reply