Copy link to clipboard
Copied
Hi
I am using RH8 and when creating a See Also, realise the font colour cannot be changed.
I found this post http://forums.adobe.com/message/471145#471145 with instuctions to add an image and hyperlink it to a javascript.
I am not at all computer savvy and am not very familiar with javascript. Although I thought I had followed the instruction, when I compile the CHM guide and test it, the Internet Explorer Script Error window displays with the error the following error:
Line: 1
Char: 1
Error: 'object1' is undefined
Code: 0
Is there something I am missing from the instructions?
Ah, you triggered a memory.
I tracked down the thread and there are a couple of scripts posted - although I haven't tried to download them, so can't guarantee that they are still available as listed. Or possibly they are available on Peter Grainge's site - www.grainge.org - he has the most amazing repository of RH knowledge on the planet.
Related Topics control via "JavaScript:RelatedTopics.Click" broken in RH8
Amber
Copy link to clipboard
Copied
You need to have a look at the HTML code for your see also button and see what ID it has. It'll look something like this:
<object CLASSID="clsid:A2F1FA63-C1E6-11d2-9140-006DC83B9955"
ID=SeeAlso
BORDER=0
style="margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
vertical-align: baseline;"
align=bottom>
The bit after ID is what you need in the javascript so something like the below, depending what text occurs:
javascript:SeeAlso.Click()
or
javascript:object1.Click()
or
javascript.Object1.Click()
Copy link to clipboard
Copied
Hi
I had checked that I had the right ID (object1) in this case, as I noticed Rick's post, but thanks for the help.
If you can think of anything else, please let me know.
Adele
Copy link to clipboard
Copied
Can you post the code? Perhaps there's a typo somewhere causing it that fresh eyes might spot?
Copy link to clipboard
Copied
Hi
Here goes:
</table>
<p>
<!--Metadata type="DesignerControl" startspan
<object classid="clsid:A2F1FA63-C1E6-11d2-9140-006DC83B9955" border="0"
id="object1" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px;
margin-right: 0px;" align="bottom">
<param name="_Version" value="65536" />
<param name="_ExtentX" value="1323" />
<param name="_ExtentY" value="556" />
<param name="_StockProps" value="13" />
<param name="ForeColor" value="0" />
<param name="BackColor" value="15790320" />
<param name="UseButton" value="0" />
<param name="UseText" value="0" />
<param name="ControlLabel" value="See Also" />
<param name="UseIcon" value="0" />
<param name="Items" value="Guide$$**$$" />
<param name="Image" value="" />
<param name="FontInfo" value="Verdana,10,0,," />
<param name="_CURRENTFILEPATH" value="C:\LOCAL GUIDES\Sample_Guide\Guide_conventions.htm"
/>
<param name="_ID" value="object1" />
<param name="DialogDisplay" value="1" />
<param name="Frame" value="" />
<param name="Window" value="" />
<param name="ChmFile" value="" />
<param name="DisableJump" value="0" />
</object>-->
<object
classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"
type="application/x-oleobject">
<param name="Command" value="ALink,MENU" />
<param name="Font" value="Verdana,10,0,," />
<param name="Frame" value="" />
<param name="Item1" value="" />
<param name="Item2" value="Guide" />
</object>
<!--Metadata type="DesignerControl" endspan-->
<a href="javascript:object1.Click();"><img src="2012_related_topics.gif"
alt="" style="border: none;"
width="95" height="25" border="0" /></a></p>
</body>
Thanks for your help.
Adele
Copy link to clipboard
Copied
The second OBJECT tag is missing the ID. So if you just add it in it should work. I think double-clicking on the hidden control and clicking OK would probably add it in automatically.
Copy link to clipboard
Copied
Hi
Thanks for all your help.
Double-clicking the hidden control doesn't work.
By second object tag, do you mean?:
<object
classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"
type="application/x-oleobject">
<param name="Command" value="ALink,MENU" />
<param name="Font" value="Verdana,10,0,," />
<param name="Frame" value="" />
<param name="Item1" value="" />
<param name="Item2" value="Guide" />
</object>
I tried to add it in there, but it is removed each time. By the way, as background, from <!--Metadat...a to the first </object>-- appears green. The second <object... to </object> appears in the usual multi-colored HTML and then the <!--Metadata endspan is green again.
Could you show me the corrected entry?
Thanks
Copy link to clipboard
Copied
Hi all
If memory serves, that's a bug that version 8 introduced. I believe that It strips out the tag. Unfortunately, you will probably struggle with this a bit.
Cheers... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7, 8 or 9 within the day! |
Copy link to clipboard
Copied
Hi Rick
Thanks. That gives me more weight for upgrading to RH9.
Looks like I will have to give up with this one for now.
Cheers
Adele
Copy link to clipboard
Copied
Ah, you triggered a memory.
I tracked down the thread and there are a couple of scripts posted - although I haven't tried to download them, so can't guarantee that they are still available as listed. Or possibly they are available on Peter Grainge's site - www.grainge.org - he has the most amazing repository of RH knowledge on the planet.
Related Topics control via "JavaScript:RelatedTopics.Click" broken in RH8
Amber
Copy link to clipboard
Copied
Thanks for the thread. I downloaded the scripts and they will do as a work around. We use both CHM and WebHelp and the scripts worked for each one.
Thanks again for all your help. I was sure I had added everything ok and was going crazy!