Skip to main content
January 24, 2012
Question

File Path contains the token "bc-"

  • January 24, 2012
  • 1 reply
  • 1523 views

We recently upgraded to the RoboHelp version 9 and are finding a critical problem within all generated html files. It seems RoboHelp is inserting a new script in every html file which we would like to either modify or remove. The snippet of this script is given below.

Our problem is that we have stored these files in a path that has this token “bc-“ - C:\projects\{705e5340-460b-11e1-b8bc-0800200c9a66}.

We need your help to either modify this token or remove this check from all project files.

SNIPPET:

========

if (window.gbWhTopic)
{
  var strUrl = document.location.href;
  var bc = 0;
  var n = strUrl.toLowerCase().indexOf("bc-");
  if(n != -1)
  {
  document.location.href = strUrl.substring(0, n);
  bc = strUrl.substring(n+3);
  }

    This topic has been closed for replies.

    1 reply

    Peter Grainge
    Community Expert
    Community Expert
    January 25, 2012

    Egh?

    Token?

    What problem is being caused by the code? It is in all of my webhelp and is not causing any problems.


    See www.grainge.org for RoboHelp and Authoring tips

    @petergrainge

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    January 25, 2012

    Thanks for replying. Here is the aftermath of this script.

    if this is the directory of the html file -

    C:\projects\{705e5340-460b-11e1-b8bc-0800200c9a66}\foo.htm

    Then the "bc-" token check redirects browser to a new page -

    C:\projects\{705e5340-460b-11e1-b8 where there is nothing.

    I don't want any redirection based the fact that the directory name

    has a token "bc-". Obviously the script is breaking the complete path

    into two parts and returning the first part to the browser.

    Peter Grainge
    Community Expert
    Community Expert
    January 25, 2012

    I have never seen that script cause any problems by redirecting.

    Open one of the sample project and generate an output. I think you will find it works fine and that it has the same script.

    Sorry but I don't know enough about scripting to see how it is doing something different for you. Are you saying it is because the path contains the string bc?

    If it is, I don't understand why you have a path that contains 705e5340-460b-11e1-b8bc-0800200c9a66. Maybe if you explain that, it will help us help you. Bear in mind we are not developers.


    See www.grainge.org for RoboHelp and Authoring tips

    @petergrainge

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.