Page 1 of 1

Custom toolbar button or link to close Help window

Posted: Fri Jan 20, 2012 2:40 pm
by Jeannie Marzonie
I'm delivering Mobile WebHelp for two HTML5 applications. I'd like to be able to have a button or link on the topic toolbar that closes the Help browser window and returns the user to the main app. Any ideas?

Re: Custom toolbar button or link to close Help window

Posted: Fri Feb 10, 2012 10:29 am
by JasonSTI
A lot will depend on how you are calling the help from your apps. As long as you are calling them as a child via Javascript, i.e.:

Code: Select all

<a href="" onclick="window.open('Default.htm?cshid=1000', 'hlpwnd');">Help!</a>
Then you can simply add a standard Javascript close button:

Code: Select all

<a href="" onclick="window.close;">Close</a>
If you are not calling the help via Javascript, then the button will either do nothing, or warn the user that the script is attempting to close the window. The help HAS to be a child window to close problematically.

We havn't got into testing this heavily with mobile browsers, so there may be some sticking points, but it works on our initial tests.