toolbar "Goto Top" button in latest Tripane

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Ian Meredith
Jr. Propeller Head
Posts: 3
Joined: Tue Jun 18, 2019 3:49 am

toolbar "Goto Top" button in latest Tripane

Post by Ian Meredith »

Hi I know people have discussed the toolbar before and also "Goto top" buttons - but I have found the results confusing and understand the answer will vary between SideNav and TopNav and possibly the Tripane answer will also have changed with its move to the use of Iframes. I am looking at possibly reverting to a Tripane skin for a possible user preference for the form and behavior of its navigation menu as opposed to SideNavs.

Anyone know what I need to enter in the toolbar button event and/or script to get an "Up" button to function in the Tripane? (I do not wish to put a button on the Topic itself)

(I do understand that SideNav is supposed to be an improvement on the Tripane but the issues with the old Tripane seem gone and it has a number of features such as the persistent toolbar - not one which scrolls off page that offer their own advantages.it preferable.)
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: toolbar "Goto Top" button in latest Tripane

Post by NorthEast »

You need to handle Tripane differently because the topic is inside an iframe, and the skin toolbar button is outside of that iframe.

So the toolbar button onclick event would look like this:

Code: Select all

$('#topic').contents().scrollTop(0);
This works by:
* Selecting #topic which is the ID of the iframe.
* Using contents() to select the content in that iframe (your topic).
* Using ScrollTop to scroll to the top (0) of the page.

Note that this only works on a server. It won't work on your local PC because the security settings will block a script that does something to another page.
It will work fine on a server though, provided all your output is on the same domain.
Post Reply