Close button for HTML5 skin

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
JimLeft
Propeller Head
Posts: 13
Joined: Wed Aug 01, 2018 7:15 am

Close button for HTML5 skin

Post by JimLeft »

I have a HTML5 Top Navigation skin for web-based Help.
I have been asked to include a Close button on each topic page.

Where would I find steps on adding a Close button?
I can't find any details describing such a process.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Close button for HTML5 skin

Post by NorthEast »

Daft question - why do you need a close button?

Usually, you'd just close the browser window/tab.

Whilst there is a window.close javascript function, I *think* most modern browsers will block this, unless it's used in a popup window that you opened yourself (via javascript).
JimLeft
Propeller Head
Posts: 13
Joined: Wed Aug 01, 2018 7:15 am

Re: Close button for HTML5 skin

Post by JimLeft »

David,

Thank you for your answer and for your insightful question.

I have been asked to include a Close button on each CSH web page.
People from a wide range of backgrounds and computer literacy will be accessing the CSH.
If there is not something indicating how to close the CSH, the support team will hear about it.

From what I have been able to find, a Close button can be added to HTML5, but only to HTML5 Tri-pane and not to Top Nav, which is the current Help format.
Can a close button be added to HTML5 Top Nav?

Thank you in advance,
Jim
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Close button for HTML5 skin

Post by NorthEast »

JimLeft wrote:From what I have been able to find, a Close button can be added to HTML5, but only to HTML5 Tri-pane and not to Top Nav, which is the current Help format.
Can a close button be added to HTML5 Top Nav?
Do you have a link to this information? If it is prior to 2017, it may not work in modern browsers.

I don't think the skin will matter at all. The only difference between Tripane and Top Nav is that Tripane uses frames, so for Tripane you'd want to close the parent window (not the current topic window).

The main point here is that most modern browsers do not allow the window to be closed (from 2017ish), except for windows that you've opened yourself using javascript.

So it *might* work if you use the Javascript method for CSH calls - https://help.madcapsoftware.com/flare20 ... lopers.htm

In your project, try creating a button (i.e. skin toolbar button) or just a link, and set it to run the javascript:

Code: Select all

self.close();
It'll either work or not work. If it doesn't work in a particular browser, then check the browser's console log; but there's probably not an awful lot you can do about it.
JimLeft
Propeller Head
Posts: 13
Joined: Wed Aug 01, 2018 7:15 am

Re: Close button for HTML5 skin

Post by JimLeft »

David,

Thank you for your answers. I will discuss what you said with the developer. I believe opening a separate window is a good approach and will hopefully allow the Close button to be added because it will be in a separate window.

Thanks again,
Jim
Post Reply