11 Replies Latest reply on Feb 17, 2016 7:57 PM by JaredHess

    Why is one of my topics getting its breadcrumb formatting from javascript code?

    JaredHess Level 1

      I'm using the latest RH 9.

       

      My output is an html help output (chm).

       

      I use breadcrumbs in all topics. They're generated at compile time from the single source layout. They don't come from a bc placeholder in the .htt nor from the .htm topics.

       

      Let's examine just two topics:

       

      Topic1 here has some not-so-good formatting (ugly standard blue) in the breadcrumbs:

       

       

       

      Topic2 here has the desired formatting in the breadcrumbs (aside from the formatting of the final item in the bc trail--but that's a separate issue):

       

       

      When I look at the compiled topic's html source for Topic1 (from the chm in Notepad++, it has this code. Notice the JavaScript code it's getting (that I marked in red):

       

      Source from Topic1 in CHM

      <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

      <html>

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

       

       

       

       

      <meta name="generator" content="Adobe RoboHelp 9">

      <title>Step 1: Installing PC-DMIS</title>

      <link rel="stylesheet" href="Pcdmis40.css" type="text/css">

      <script type="text/javascript" language="javascript">var strUrl = document.location.href;

      var bc=0;

      var n = strUrl.toLowerCase().indexOf("642b3b9347ca42c9b00b820c00c373fa=");

      if(n != -1)

      {

      bc = strUrl.substring(n+33);

      document.location.href = strUrl.substring(0, n);

      }

      if(bc == 3) strUrl = "<p style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\"> <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Introducing_Direct_CAD_Interfaces.htm\">Home</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Direct_CAD__Interfaces_and_Translators.htm\">Direct CAD™ Interfaces and Translators</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Installation_Overview.htm\">Installing and Using the Direct CAD Interfaces</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"SolidWorks_Direct_CAD_Interface.htm\">SolidWorks Direct CAD Interface</a> > Step 1: Installing PC-DMIS</p>";

      if(bc == 2) strUrl = "<p style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\"> <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Introducing_Direct_CAD_Interfaces.htm\">Home</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Direct_CAD__Interfaces_and_Translators.htm\">Direct CAD™ Interfaces and Translators</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Installation_Overview.htm\">Installing and Using the Direct CAD Interfaces</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"I-DEAS_Direct_CAD_Interface.htm\">I-DEAS Direct CAD Interface</a> > Step 1: Installing PC-DMIS</p>";

      if(bc == 1) strUrl = "<p style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\"> <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Introducing_Direct_CAD_Interfaces.htm\">Home</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Direct_CAD__Interfaces_and_Translators.htm\">Direct CAD™ Interfaces and Translators</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Installation_Overview.htm\">Installing and Using the Direct CAD Interfaces</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"CATIA_5_Direct_CAD_Interface.htm\">CATIA 5 Direct CAD Interface</a> > Step 1: Installing PC-DMIS</p>";

      if(bc == 0) strUrl = "<p style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\"> <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Introducing_Direct_CAD_Interfaces.htm\">Home</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Direct_CAD__Interfaces_and_Translators.htm\">Direct CAD™ Interfaces and Translators</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Installation_Overview.htm\">Installing and Using the Direct CAD Interfaces</a> > <a style=\"font-family: ; font-size: 10pt;  font-style:normal; color: rgb(0, 0, 255); text-decoration:none; text-align: right\" href=\"Unigraphics_Direct_CAD_Interface.htm\">Unigraphics Direct CAD Interface</a> > Step 1: Installing PC-DMIS</p>";

      </script>

      </head>

       

      <body lang="EN-US" xml:lang="EN-US"><a name="642b3b9347ca42c9b00b820c00c373fa=3"></a><a name="642b3b9347ca42c9b00b820c00c373fa=2"></a><a name="642b3b9347ca42c9b00b820c00c373fa=1"></a><script type="text/javascript" language="javascript">document.write(strUrl)</script>

      <h4>Step 1: Installing PC-DMIS</h4>

      <p class="BodyText">First, you need to install PC-DMIS. To install PC-DMIS,

      follow this procedure:</p>

      <ol type="1">

          <li class="p-List"><p class="BodyText">Plug your PC-DMIS portlock (also

           known as a dongle) into the appropriate port of your PC.</p></li>

          <li class="p-List"><p class="BodyText">Insert the PC-DMIS CD-ROM into

           your CD-ROM drive.</p></li>

          <li class="p-List"><p class="BodyText">Using Windows Explorer, open

           the directory containing the CD-ROM and then navigate to the <span

           class="bold">setup.exe</span> application for PC-DMIS.</p></li>

          <li class="p-List"><p class="BodyText">Double click (execute) the file

           <span class="bold">setup.exe</span>.</p></li>

          <li class="p-List"><p class="BodyText">This will activate the PC-DMIS

           installation sequence.</p></li>

          <li class="p-List"><p class="BodyText">Follow the on-screen instructions

           until PC-DMIS is installed.</p></li>

      </ol>

      <p class="BodyText">This completes the PC-DMIS installation.</p>

      </body>

      </html>

       

       

      Yet when I examine the essential parts of Topic1 and Topic2 in Notepad++, there's nothing different aside form the expected body text. Can one of you see anything?

       

      Topic1 Source

      <?xml version="1.0" encoding="utf-8" ?>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml">

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

      <meta name="Originator" content="ImportDoc" />

      <meta name="OriginalFile" content="PreRobohelp - DCI.doc" />

      <meta name="topic-status" content="Complete" />

      <meta name="topic-check-List" content="Ran Smart Index" />

      <meta name="template" content="standard.htt" />

      <meta name="generator" content="Adobe RoboHelp 9" />

      <title>Step 1: Installing PC-DMIS</title>

      <link rel="stylesheet" href="Pcdmis40.css" type="text/css" />

      </head>

       

      <body lang="EN-US" xml:lang="EN-US">

      <?rh-placeholder type="header" ?>

      <h4>Step 1: Installing PC-DMIS</h4>

      <p class="BodyText">First, you need to install PC-DMIS. To install PC-DMIS,

      follow this procedure:</p>

      <ol type="1">

          <li class="p-List"><p class="BodyText">Plug your PC-DMIS portlock (also

           known as a dongle) into the appropriate port of your PC.</p></li>

          <li class="p-List"><p class="BodyText">Insert the PC-DMIS CD-ROM into

           your CD-ROM drive.</p></li>

          <li class="p-List"><p class="BodyText">Using Windows Explorer, open

           the directory containing the CD-ROM and then navigate to the <span

           class="bold">setup.exe</span> application for PC-DMIS.</p></li>

          <li class="p-List"><p class="BodyText">Double click (execute) the file

           <span class="bold">setup.exe</span>.</p></li>

          <li class="p-List"><p class="BodyText">This will activate the PC-DMIS

           installation sequence.</p></li>

          <li class="p-List"><p class="BodyText">Follow the on-screen instructions

           until PC-DMIS is installed.</p></li>

      </ol>

      <p class="BodyText">This completes the PC-DMIS installation.</p>

      <?rh-placeholder type="footer" ?>

      </body>

      </html>

       

       

       

      Topic2 Source

      <?xml version="1.0" encoding="utf-8" ?>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml">

      <head>

      <meta name="template" content="standard.htt" />

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

      <meta name="Originator" content="ImportDoc" />

      <meta name="OriginalFile" content="PreRobohelp - DCI.doc" />

      <meta name="topic-status" content="Complete" />

      <meta name="topic-check-List" content="Ran Smart Index" />

      <meta name="generator" content="Adobe RoboHelp 9" />

      <title>Step 1: Installing the Pcdcat Interface File on the CATIA System</title>

      <link rel="stylesheet" href="Pcdmis40.css" type="text/css" />

       

      </head>

       

      <body lang="EN-US" xml:lang="EN-US">

      <?rh-placeholder type="header" ?>

      <h4>Step 1: Installing the Pcdcat Interface File on the CATIA System</h4>

      <ol type="1">

          <li class="p-List"><p class="BodyText">Determine on which UNIX operating

           system the CATIA system is currently running. Supported operating

           systems are:</p></li>

      </ol>

      <ul type="disc">

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">IBM's

           <span class="italic">AIX</span></p></li>

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">SGI's

           <span class="italic">IRIS</span></p></li>

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">HP's

           <span class="italic">HP-UX</span></p></li>

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">SUN's

           <span class="italic">SOLARIS</span></p></li>

      </ul>

      <ol start="2" type="1">

          <li class="p-List"><p class="BodyText">Create a directory called &quot;pcdmis&quot;

           under a CATIA user directory for installing PC-DMIS files. <span class="bold">Example:</span>

           /home/catadm/pcdmis</p></li>

          <li class="p-List"><p class="BodyText">Place the appropriate PC-DMIS/CATIA

           interface file in the PC-DMIS directory of your UNIX workstation.

           This interface file will be one of the following files, depending

           on your type of UNIX workstation:</p></li>

      </ol>

      <ul type="disc">

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">pcdcat.ibm.gz</p></li>

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">pcdcat.sgi.gz</p></li>

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">pcdcat.hp.gz</p></li>

          <li class="p-List"><p class="BodyText" style="margin-left: 48px;">pcdcat.sun.gz</p></li>

      </ul>

      <ol start="4" type="1">

          <li class="p-List"><p class="BodyText">You can also download the latest

           PC-DMIS/CATIA interface file from ftp://wilcoxassoc.com/dci/catia/.</p></li>

          <li class="p-List"><p class="BodyText">On the UNIX station, unzip the

           pcdcat file with the gunzip command: <span class="bold">gunzip </span><span

           class="italic">&lt;filename&gt;</span></p></li>

          <li class="p-List"><p class="BodyText">Once the file is in the PC-DMIS

           directory on your UNIX workstation and unzipped, rename the file to

           simply “pcdcat” (without any file name extension).</p></li>

      </ol>

      <?rh-placeholder type="footer" ?>

      </body>

      </html>

       

       

      Somehow, during compile time, Topic1 (and others) is getting that javascript code and it is conflicting with the formatting I have setup in my stylesheet and in jQuery calls in my .htt.

       

      Where oh where does the rogue javascript code come from? Thanks in advanced for any help you can provide.

       

      Message was edited by: Jared Hess. I pasted the code as straight text since the source code wasn't showing properly in the nifty controls that Adobe offers here that only sometimes work.

        • 1. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
          Amebr Level 4

          Are you sure the first topic hasn't somehow had the breadcrumbs code applied either through a master page or directly into the topic? I know I used to have problems years ago with the master page  detaching itself and embedding the code into the topics somehow. (I also noticed the green header isn't in the problem topic which suggests the setup might be different.)

           

          So I'd triple-check the HTML, the applied master page and css in the problem topic.

          • 2. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
            JaredHess Level 1

            Funny, I've looked at this so long, I didn't even notice Topic1 was missing the green header. But I did try reapplying the master page. I'll try it again.

            • 3. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
              JaredHess Level 1

              I reapplied the master page. The green header now appears but the link formatting is still all blue in the chm:

               

               

              Hmmm. My backup solution is to apply the bc call directly in the .htt header and see if that fixes it. I think that would be a solution, but my main question is how in the heck did RH do this? What tells it to apply the script code when it builds the chm?

              • 4. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                Captiv8r Adobe Community Professional & MVP

                Hi Jared

                 

                I've seen Willam van Weelden regularly talk about the CHM format and how it uses an older setting in the IE browser. Thus some things either don't work, or don't work as you would expect in CHM format as a result.

                 

                I'm guessing that you have tried configuring the hyperlink items in your CSS? Seems that's what is being picked up here. At least that's my own guess.

                 

                But then if you manage to get the coloring as you want, you will see ALL your hyperlinks become that color and that may not be desired. So you may find you will have to methodically create a special CSS class that is used to govern things and apply it specifically to all your basic hyperlinks. I'm doubtful you could make it work by applying to only the breadcrumbs, because those are being added courtesy of the compilation process and even though you have specifically instructed them to be a different color, you aren't getting what you want.

                 

                Cheers... Rick

                • 5. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                  JaredHess Level 1

                  Yes, I know chms are basically IE 7 under the hood. This is a source of consternation for me (since I'm limited with my CSS options), but can't change my output yet.

                   

                  I did verify that a web based output looks fine.

                   

                  I am using CSS to apply link colors for all topics.

                   

                  Since breadcrumbs are added later without getting the CSS link style (annoying that Adobe set it up that way without even giving it a class name or something so we can style it with a .css but I digress), I then use jQuery to specifically target those. It's a bit of a kudgy workaround and that's why I end up with the good link color and the dark blue formatted final breadcrumb entry.

                   

                  But again, my main question is not necessarily how to fix it, because I think can do that with my plan B of directly putting in the bc into the .htt header. Rather my question is WHERE and HOW is RoboHelp being told to apply the script code? It just doesn't make sense to me.

                  • 6. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                    KimberlyO Level 2

                    Does it matter with the meta tags if they aren't in the same order? The <meta-name="template" content="standard.htt" /> is in different locations between the two topics.

                    Capture.JPG

                    • 7. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                      JaredHess Level 1

                      Hi KimberlyO, thanks for your comment.

                       

                      I tested it and verified that the order of that tag doesn't matter.

                      I put it to the same location as the other and the topic still looks the same.

                      I've noticed that when I un-apply and reapply a master page, RH rewrites the meta-name tag in random locations within the <head> </head> block.

                      • 8. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                        Willam van Weelden Adobe Community Professional & MVP

                        How are you adding the breadcrumbs? If it's the breadcrumbs placeholder, you can choose to apply topic level formatting. Adding a paragraph style 'breadcrumbs' to the CSS should do to the trick.

                        • 9. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                          Amebr Level 4

                          Hmm, my next suggestion was going to be to check if Robohelp was pretending that some code was / wasn't in the source, but then I noticed you used Notepad++, so that idea is out the window ( for the curious Re: style sheet not being applied to certain topics in .chm file)

                           

                          My other "clutching at straws" idea is maybe delete the "OriginalFile" meta tag. I know it's in all your topics, and Peter says he hasn't ever seen it cause a problem in online outputs, but maybe with the planets in a particular alignment it's causing some weirdness. (Importing Using RoboHelp 9, 10 and 11 under "Fixing the import").

                           

                          But you may just be better off changing the method to the .htt.

                          • 10. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                            JaredHess Level 1

                            I've been

                            Willam van Weelden wrote:

                             

                            How are you adding the breadcrumbs? If it's the breadcrumbs placeholder, you can choose to apply topic level formatting. Adding a paragraph style 'breadcrumbs' to the CSS should do to the trick.

                            No, not the placeholder. I've been applying them at compile time in the single source layout. But I think I'm going to have to do the placeholder approach to get around the styling issues I'm having.

                             

                            One of the reasons I originally didn't want to apply topic level is because our main help file has ~1400 topics and doesn't use a header (an oversight) and I didn't want to have to commit a bazillion (okay 1.5 thousand) files into our source repository and scare everyone with such a massive change.

                             

                            But we're going to be upgrading to RH 2015 this week, and every topic is going to get a modification anyway, so I guess it's a good time to do this.

                            • 11. Re: Why is one of my topics getting its breadcrumb formatting from javascript code?
                              JaredHess Level 1

                              Amebr wrote:

                               

                              Hmm, my next suggestion was going to be to check if Robohelp was pretending that some code was / wasn't in the source, but then I noticed you used Notepad++, so that idea is out the window ( for the curious Re: style sheet not being applied to certain topics in .chm file)

                               

                              My other "clutching at straws" idea is maybe delete the "OriginalFile" meta tag. I know it's in all your topics, and Peter says he hasn't ever seen it cause a problem in online outputs, but maybe with the planets in a particular alignment it's causing some weirdness. (Importing Using RoboHelp 9, 10 and 11 under "Fixing the import").

                               

                              But you may just be better off changing the method to the .htt.

                              Thanks Amebr.

                               

                              Yeah, I think I'm going to just go the .htt breadcrumb place holder route in the header. I gotta wrap this thing up. It just bugs me when RoboHelp does things that don't make sense.

                               

                              What I THINK happened was a few topics in my project ended up getting some webhelp formatted topics back into the source. I found a few of those smattered in some of my projects the other day and this Topic1 could be one of them. Anyway, I stripped out all the scripts and CDATA styling that happens when you get those webhelp topics, and I think something leftover somewhere is still telling it to use javascript to format the breadcrumbs. If breadcrumbs placeholder in the .htt's header (Plan B) doesn't clear things up, I may have to think about recreating these oddball topics.