# HTML Document Viewer

**URL:** <https://forum.inductiveautomation.com/t/html-document-viewer/1110>\
**Category:** Archived Topics\
**Created:** [April 25, 2009, 5:50pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110 "2009-04-25T17:50:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 25, 2009, 5:50pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/1 "2009-04-25T17:50:26Z")

</div>

I’m trying to do a couple of things with the doc viewer.

1. I have scripted hyperlink events, and those work great. But, one thing I’m not sure of how to do is jumping to a specific place on the page. For instance, let’s say the document is 1000 lines long. On line 53, I have a link to something on line 700. How could I programatically jump or scroll down to line 700? Do I somehow have access to that property?

2. I can’t seem to get tool tips to display. I have something entered into the Mouseover Text property, but it doesn’t show up. I was planning on progrommatically changing the text when the mouse floats over a link.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 27, 2009, 4:53pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/2 "2009-04-27T16:53:20Z")

</div>

Ok, for the links that jump to a place on the same place you use named anchors.  
So somewhere in your html you have:

```auto
<a name="jumphere">Jump to this section</a>
```

And else where you have a link like:

```auto
<a href="#jumphere">Click here to go to the other section</a>
```

And then you handle the hyperlink event like so. This code also has mouseover code that is working fine for me…

`action = str(event.eventType)
if 'ENTERED'==action:
	event.source.toolTipText=event.description
if 'EXITED'==action:
	event.source.toolTipText=None
if 'ACTIVATED'==action and event.description[0:1]=='#':
	event.source.viewport.view.scrollToReference(event.description[1:])`

Hope this helps,

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 27, 2009, 5:44pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/3 "2009-04-27T17:44:25Z")

</div>

Ok, I’m missing something with the tool tips. I have this code:

```auto
if str(event.eventType) == "ENTERED":
	print event.eventType 
	event.source.toolTipText = 'Tool Tip'
```

I can see “ENTERED” in the console, and I see the mouseover text change to “Tool Tip” in the designer, but no tool tips appear on the screen. I tried tool tips with a few other components, and they are visible with buttons and drop down lists, but not tables or my doc viewer. Is there some other property that could affect this?

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 27, 2009, 11:12pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/4 "2009-04-27T23:12:51Z")

</div>

Ok, now I’m getting really weird behavior. I have no idea if this is related or not, but ever since I played around with the tool tips (manually typing something in the Mouseover Text property), I can’t set the cursor type anymore. Every control on my window now has the “W Resize” cursor (I didn’t change these), and I can’t change them back. If I highlight a control and try to change the cursor to “Automatic”, the selection reverts immediately back to “W Resize”. If I select “Default”, the selection will stay at default until I save the project, and then it reverts back to “W Resize” again.

What happened?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 28, 2009, 12:42am UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/5 "2009-04-28T00:42:56Z")

</div>

You’ve happened upon an odd but known issue, totally unrelated to your other issue. This happens when you save using CTRL-S in the Designer when your mouse is over the window’s border, giving the mouse a resize cursor. You’re going to have to set your components cursors back (all the way up the component hierarchy) and save again.

I’m not sure about your tooltip issue - haven’t reproduced it yet.

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 28, 2009, 2:33am UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/6 "2009-04-28T02:33:11Z")

</div>

Wow, I never would have figured that out. I always use ctrl-s, so that’s definitely what happened. We’re back to normal now.

I’ve done everything I could to make tool tips work on my doc viewer and table, but no dice. I’ve attached a snapshot of the properties in case that helps.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/c19dc8bf07f68f3f0f74780227b70a6d1a2f02eb.jpg)

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 29, 2009, 9:03pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/7 "2009-04-29T21:03:15Z")

</div>

I’ve attached a sample window that shows what I’m trying to do. There is a button that sets the text, and a label that shows the actual toolTipText. The button will create a html string with 20 lines, a bunch of blank lines, and 20 destination lines.

The label displays the mouseover text from the entered/exited events, but I still don’t see tool tips above the links. But, if I drag the mouse very slowly over the border of the doc viewer, the tooltip will appear for the width of the border. It could be my imagination, but it seems to be easier to get it to appear with a wider border (such as ‘beveled’) than a line border.

I’ve played around with the opaque property and the layering of the components, but nothing seems to work. Ideas?  
[Html\_Window.fwin](https://us1.discourse-cdn.com/inductiveautomation/original/1X/9e9208b589071707cc9aac43065cc80ad44503a7.fwin) (11.8 KB)

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 29, 2009, 9:22pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/8 "2009-04-29T21:22:37Z")

</div>

I believe you, but you can see why I’m having trouble pinning this down. What version of Java are you running the client in?  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/f4cd39690bb52ac3cae094cafa0493b6d243219d.png)

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 29, 2009, 9:56pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/9 "2009-04-29T21:56:16Z")

</div>

From the designer: Java Version: Sun Microsystems Inc. 1.6.0\_12

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 29, 2009, 10:12pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/10 "2009-04-29T22:12:29Z")

</div>

I just tried it on another computer with Java version 1.6.0\_04 and got the same results. Both pcs are running FPMI v 3.3.1 Build 2549.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 29, 2009, 10:16pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/11 "2009-04-29T22:16:13Z")

</div>

Well FWIW, I’m on 1.6.0\_13 and FactoryPMI 3.3.2

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 30, 2009, 2:44am UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/12 "2009-04-30T02:44:48Z")

</div>

Well, I updated FPMI to 3.3.2, and now it’s working. I left Java alone since I have it set on auto update anyway. We’re back in business.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 30, 2009, 3:23pm UTC](https://forum.inductiveautomation.com/t/html-document-viewer/1110/13 "2009-04-30T15:23:43Z")

</div>

Huh, well, glad its working, although I’m hard pressed to find any differences between 3.3.1 and 3.3.2 that should affect this…
