Skip to main content
March 5, 2013
Question

Robo v9 Show/Hide without Twisties - One button no longer working

  • March 5, 2013
  • 1 reply
  • 1445 views

Hey there, as stated I am using Robo v9 with Show/Hide without Twisties (One button) with javascipts.  We have most of our images using DHTML drop-downs and when folks click on "Show All Images" on the page, the GIF changes to "Hide All Images" and all drop-downs (our images) and expanding text are diaplayed.

It had been working all the time, but now it only works when I right click the topic in the TOC and choose "Edit Topic", then while in the Edit Window (Display view), when I do a View (Ctrl-W) and it displays the page within RoboHelp..I can click the "Show All Images" and it works like it always had.  BUT, if that page is not in the Edit Window, and I right click "Preview Topic", the click "Show All Images" (or on the DHTML dropdown itself) it will NOT show the images, *but the GIF image does properly toggle to "Hide All Images" (and if I do again, then it properly toggles to the "Show All Images" GIF, if I do it again), but now NO images are getting displayed for some reason.  It also NEVER works properly when I publish to our website (even when clicking the DHTML dropdown itself), but the GIF images toggle properly.

If I right click and choose "Preview Topic" and click "View With" and use Internet Explorer 8 it still never works anymore, unless the topic is in the Edit Window (Display View), so I know the issue is not on the server.  It stops working after I do a generate and run on my pc.  Also when I view it IE8 within Robo (and Allow the Blocked Content to run the scripts), many instances of the same error is shown as:

--

Message: Access is denied. 

Line: 2646
Char: 3
Code: 0
URI: file:///D:/Users/_RBH9_TPO-Generate/v9-testing/ehlpdhtm.js

--

...but I *do* have access to the folder system, but in checking the coding of the ehlpdhtm.js, that area show, where I believe line 2646, character 3 starts at the "values = getAttribute(element, prop );" line below...but maybe something does not exist:

==

 

//End HTML code invoked function

function InitEffect( element, prop )
{
var values = null;
if( getAttribute(element,prop)) 
  values = getAttribute(element, prop );
else if( getAttribute( element, "currentStyle" )  && element.currentStyle.getAttribute)
  values = element.currentStyle.getAttribute( prop );
else  if (element.style.getAttribute)
  values = element.style.getAttribute( prop );
 
if( !values )
  return;
   
var functions = new Array();

==

I have a much older backup when restored, it all works properly again in all cases, but I have done so much work since then that I think would need to be manually redone.  I have played with keeping those some javascipts alone (in case I changed something) and updated the rest of the data files I had added, deleted the .CPD file, but it somehow stops working again, probably with some updated file.  I am not sure what specific files could be causing the negative impact that is preventing it from working.  Maybe if I knew what files could impact, I couldrestore those from my old backup.  The newer backups when restored do not work properly, so there was a point in time where something changed and is causing this.

All prior versions of RoboHelp (v7 and v8) have always worked and still do.  I am using v9.0.1.262, as the latest version has not yet been allowed on our pcs (per security), but since my earlier backup works, I thought it may not be the issue, but wanted to tell you anyway.  ;->

Any ideas on how I should proceed?  What files may have impact to cause it not to work anymore?  The showhide.js is the only .js to show up as a baggage file.  Also, the DHTML line does exits in each html page's code, as we are still using Robo v7 as the production software and the Show/Hide always works, and I copy them into the respective Robo v9 folders (and if new, then I copy them, then import them), otherwise the newer v7 updated pages are copied over the older v9 html files while RoboHelp is closed.

Thanks in advance for any info you can provide!

This topic has been closed for replies.

1 reply

Willam van Weelden
Inspiring
March 5, 2013

Hi,

Which version of the script are you using? See grainge.org/pages/authoring/twisty/twisty.htm

There are different versions so it's hard to say what is happening without knowing the version you are using.

Greet,

Willam

March 5, 2013

I believe it is the Toolbar Single Show / Hide Button, as listed in the thread's Subject line.  It is not very large.  I hope it is OK to paste here.  Thanks for your reply!

Message was edited by Peter Grainge to remove the script, not needed.

March 8, 2013

With scripts it is sometimes the case that they do not work in all views. As long as you can see it working somehow when working on a topic and as long as the help generated works in the supported browsers, you may have to accept that.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge


I may have figured out what to fix to get v9 back to working on the Show/Hide button, but not the "why?" .

It looks to all be dealing with the Robo automatic html coding of where to locate the .js file(s)...here is a quick overview of this issue and what I did.  When I view the non-working pages within Internet Explorer 8 within Robo (and Allow the Blocked Content to run the scripts), I saw many instances of the same error is shown as this in the log, which implied since I *do* have access rights, maybe the file was just not being found.

 

--

Message: Access is denied.

 

Line: 2646
Char: 3
Code: 0
URI: file:///D:/Users/_RBH9_TPO-Generate/v9-testing/ehlpdhtm.js
--
 

OK, here are my findings.  EXAMPLE #1 and EXAMPLE #2 below are excerpts of the same file.  EXAMPLE #1 is from Robo v7 and is copied to the v9 folder after it was updated so our soon to be "production" webhelp will be from Robo v9 (instead of making the same manual updates in Robo v9 as in Robo v7, I copy the updated the .html file to the Robo v9 file system).  Note the direction of the directory slashes of the java scripts listed below, as they are all DOS type slashes (back slashes), EXCEPT for ehlpdhtm.js as it is the ONLY one using UNIX (forward) slashes.

EXAMPLE #1 (from Robo v7)

==

<link rel="StyleSheet" href="..\..\sty-std-topic.css">

<script type="text/javascript" language=JavaScript x-save-method=compute-relative

src="..\..\showhide.js"></script>

</head>

<body>

<robohelp><script type="text/javascript" language=JavaScript1.2 src="../../ehlpdhtm.js"

x-save-method=compute-relative></script>

<script type="text/javascript" language=JavaScript1.2>

<!--

if( typeof( InitEffects ) != 'function' ) InitEffects = new Function();if( typeof( InitTrigger ) != 'function' ) InitTrigger = new Function();if( typeof( FilePopupInit ) != 'function' ) FilePopupInit = new Function();if( typeof( TextPopupInit ) != 'function' ) TextPopupInit = new Function();

//-->

</script>

==

EXAMPLE #2(from Robo v9)

This is from the restored backup of the Robo v9 files that always work when I restore them, and note they are ALL UNIX (forward) slashes.  These backup files were generated from Importing/Upgrading a copy of the Robo v7 files into Robo v9.

++

<title>[Endpoint Protection] Symantec Overview</title>

<link rel="StyleSheet" href="../../sty-std-topic.css" type="text/css" />

<script type="text/javascript" language="JavaScript" src="../../showhide.js">

</script>

</head>

<body>

<?rh-script_start ?><script src="../../ehlpdhtm.js" type="text/javascript" language="JavaScript1.2">

</script><?rh-script_end ?>

++

Additional info: The following is from another file from the Robo v9 backup files that always WORK and once again they are ALL UNIX (forward) slashes

~~

<link rel="StyleSheet" href="../../sty-std-topic.css" type="text/css" />

<script type="text/javascript" language="JavaScript" src="../../showhide.js">

</script>

</head>

<body>

<?rh-script_start ?><script src="../../ehlpdhtm.js" type="text/javascript" language="JavaScript1.2">

</script><?rh-script_end ?>

~~

BUT since all .js files are referenced in EXAMPLE #1 have DOS slashes (back slashes), EXCEPT for the ehlpdhtm.js, I decided to change the line in ehlpdhtm.js FROM src="../../ehlpdhtm.js" TO src="..\..\ehlpdhtm.js" and IT (this one page) BEGAN WORKING AGAIN after I published.  So having all DOS back slashes DOES work in Robo v9!!!!  BUT it appears that Robo v9 only generates new pages using UNIX (forward) slashes in ALL coding.  I've read about issues like this occurring with the FireFox browser, but we only use IE8, and have not read anything like this related to IE8 issues. 

So if all UNIX forward slashes and all DOS back slashes can work in Robo v9 in finding and using ehlpdhtm.js, (the Show/Hide buttons function properly) why is this problem existing in Robo v9 when there are mixed "slashes" (using forward and backward)?  ...and the mixed slashes ALWAYS works in Robo v7!  They do not have to all be in the same direction in Robo v7 as it appears to have to be in the newer/more advanced Robo v9.  Why does it matter that all slashes need to be all the same direction, if Robo v9 CAN actually read and figure out the DOS back slashes (formatted by Robo v7 creation) and actually generates UNIX forward slashes for the .js files in new Robo v9 output within the .html?

More importantly will I have to always do a Global search and replace in Robo v9 to change the direction of the "back slashes" when I copy updated Robo v7 .html files into the Robo v9 folders (instead of manually reworking each change), while in transition from v7 to v9?

Thanks in advance any information, recommendations, and feedback as your time is greatly appreciated!