Enable Webhelp Back Button

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Enable Webhelp Back Button

Unread postby Aitch » Fri Feb 27, 2015 11:19 am

Hello Everyone, Long time no type :)

I've done a quick search on the forum, but I'm not exactly sure what to search for.. And if this is in the wrong forum, please move (I thought of Tips & Tricks?)

The problem I have is that some of our customers have extremely limited options within their applications. What happens is when they click on the help, instead of opening a new window, it forces it to open in the same window. Unfortunately they do not have a back button to go back to the software application, which means they need to close the browser and open again, causing them to lose their session. I know it's down to the customer's sites, but they also can't be allowed to have a right click popup menu etc.

is there a way to add a 'back' button, which will basically 'clone' the browser's back button? up until now, we've just told them that there isn't much we can do, but more people are using the help (which is always good), but then can't get back to the application.

Hope this all makes sense. Any information will be greatly appreciated!

thanks in advance
H
Version 7.2.0 Build 4029

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Aitch
 
Posts: 525
Joined: Thu Jun 10, 2004 4:52 pm
Location: Oldham, UK

Re: Enable Webhelp Back Button

Unread postby Tim Green » Fri Feb 27, 2015 2:49 pm

Hi Heidi,

From your description I'm not quite clear what the initial situation is here: Where is the WebHelp being displayed and how is it being opened?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 20080
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Enable Webhelp Back Button

Unread postby Aitch » Fri Feb 27, 2015 3:29 pm

Hi Tim,

The 'problem' situation on the customer's site is that it opens the webhelp on the same page as the software application (instead of a new tab). It's a cloud based application so it runs from within a browser. So, where normally we only just close the 'help' tab, these sites don't have tab options or back buttons.

Does that help?

So I'm trying to find a way to go back to the previous screen after they have viewed the help file (although, I can only assume that it will not restore the current session).

I have already said that it's nothing to do with the web help, and is down to the site's security settings, but needed to ask here to be sure as well.

Thanks Tim

Heidi
Version 7.2.0 Build 4029

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Aitch
 
Posts: 525
Joined: Thu Jun 10, 2004 4:52 pm
Location: Oldham, UK

Re: Enable Webhelp Back Button

Unread postby Simon Dismore » Sat Feb 28, 2015 10:35 am

Good to see you back again. If you can't fix the new/same window problem, I can think of these possibilities, but none of them is really ideal. I won't have time to check these for a week so here they are "raw"...

(A) Add a back button to your webhelp page template. This will have the same effect as backspacing or right-clicking the web page and selecting 'Back'. See this CSS trick article and the MDN Window.history docs. Pro: easily done. Con: user must step back through all their webhelp history to get back to the application, and may click too far and lose their transaction.

or (B) Add javascript to retrieve Document.referrer when webhelp is loaded. If the value is part of the application's route (rather than being another webhelp page) save it a persistent variable e.g. in local storage. Add a button to each webhelp page that can retrieve this URL and navigate to it. See this stack overflow question and the MDN Document.referrer docs Pro: Provides a single-step return to the application. Cons: can't be relied on, might be blocked by policy or user settings etc, probably won't work in https.

or (C) Before browsing to webhelp from the application, capture the application's current URL (window.location.href) and encode it so it can be included as a parameter in the webhelp request. In your webhelp, decode the parameter and save it a persistent variable e.g. in local storage. Add a button to each webhelp page that can retrieve this URL and navigate to it. See the MDN Window.location docs. Pro: best fit for the use case. Con: in this context it's presumably impossible to control how webhelp is invoked from the application, otherwise you wouldn't have asked the question.

Caution for all the above: if your help system can be hacked or intercepted, displaying a link that navigates back to the application creates a vulnerability because an attacker could substitute a compromised or faked page. To mitigate this the webhelp must be created and deployed securely, and both the application and the webhelp should be served from the same server over https.

Cheers
Simon
Simon Dismore
 
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Re: Enable Webhelp Back Button

Unread postby Martin Wynne » Sat Feb 28, 2015 5:04 pm

Aitch wrote:What happens is when they click on the help, instead of opening a new window, it forces it to open in the same window.

Hi Heidi,

This may help your customers, worth a try:

In most browsers*, if you hold down the CTRL key when clicking a link, it forces opening in a new tab. If you hold down the SHIFT key when clicking a link, it forces opening in a new browser window.

This doesn't introduce any security problems because it is under the control of the user, not the page.

If it works for your customers, your application could have a note about it next the the Help link.

*just tested working in Firefox, IE10, Google Chrome. :)

Martin.
User avatar
Martin Wynne
 
Posts: 2358
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Enable Webhelp Back Button

Unread postby Tim Green » Sun Mar 01, 2015 9:23 am

Hi Heidi,

How a web page opens from a link depends on how the link is formatted. All links to the help in their web application should have a target="_blank" attribute, like this:

Code: Select all
<a href="---path to webhelp goes here---/index.html" target="_blank"></a>

If it's a web application running in a browser this will be possible, by definition. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 20080
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Enable Webhelp Back Button

Unread postby Martin Wynne » Sun Mar 01, 2015 12:49 pm

Tim Green wrote:All links to the help in their web application should have a target="_blank" attribute

Hi Tim,

I was assuming from Heidi's post that some non-standard browsers are not honouring this. Hence also the lack of a Back button. I think Simon assumed the same.

If that's not the case Heidi, please ignore my comments and use Tim's code. But it seems unlikely you would have written a web-based application without knowing this.

regards,

Martin.
User avatar
Martin Wynne
 
Posts: 2358
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Enable Webhelp Back Button

Unread postby Wayne Chen » Mon Mar 02, 2015 1:48 am

Aitch wrote:is there a way to add a 'back' button, which will basically 'clone' the browser's back button? up until now, we've just told them that there isn't much we can do, but more people are using the help (which is always good), but then can't get back to the application.


Maybe this could help..
viewtopic.php?f=11&t=13347#p54892
User avatar
Wayne Chen
 
Posts: 13
Joined: Mon Sep 08, 2014 2:23 am
Location: Sydney

Re: Enable Webhelp Back Button

Unread postby Aitch » Mon Mar 02, 2015 12:26 pm

thank you all for your replies.

We have referred this to our managed services department, as the way it currently works, the current session is ended whenever the help screen (and our report viewer) is opened. Because this happens, we need to think of another option. but it's not down to webhelp :)

I will keep an eye on this and if they do ask for anything else, I will refer back here.

thank you again everyone for your replies.

H
Version 7.2.0 Build 4029

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Aitch
 
Posts: 525
Joined: Thu Jun 10, 2004 4:52 pm
Location: Oldham, UK


Return to Help & Manual 6 Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron