Link from content area to open search tab

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Link from content area to open search tab

Unread postby thschaer » Mon May 15, 2017 11:09 am

Hello

We are using the skin "Responsive Webhelp Flat Blue Style".
Is it possible to open the search tab on the left side with a link in the content area?

Like "You can search the whole Guide by using the Keyword-Search on the left".
By clicking the link the tab on the left changes to the search tab.

This would be very helpful.

Thanks!

& best,
Thomas.
thschaer
 
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

Re: Link from content area to open search tab

Unread postby Tim Green » Mon May 15, 2017 12:22 pm

Hi Thomas,

This is easy to do, but you need to create the link as an HTML code object because it needs a special target. Click in the topic where you want to create the link, select the HTML Code Object tool in Write > Insert Object and then enter the following code in the editing box:

Code: Select all
<a href="hmftsearch.html" target="hmnavigation">Open Search</a>

If you want to actually perform a search you can do it like this:

Code: Select all
<a href="hmftsearch.html?zoom_query=your%20search%20argument" target="hmnavigation">Open Search</a>

Note that any spaces in the search argument must be encoded as %20, as in the example. The same applies to accented characters, umlauts and other special characters. You can find a percent encoding reference for this here:

https://www.w3schools.com/tags/ref_urlencode.asp

(When you perform searches yourself in Help+Manual the internal scripts handle all the conversion and encoding.)
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: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link from content area to open search tab

Unread postby thschaer » Mon May 15, 2017 1:37 pm

Hi Tim

Thanks for the super fast reply.
This works... though with a quite big issue:
After clicking the link the search tab appears on the left (as it should).
But from the three grafics on top of the sidebar the "Table of contents" is still active.
And if i change between the three elements from now on in the "TOC" tab stays the search mask – no list of the topics.
This means, the TOC is gone and does not appear, until i refresh the site.
With this, this helpful possibility to show the users the search mask doesn't make sense...

For your info: we tested our webhelp project with a handfull of users and most of them had problems to find the search mask.
At least not in a short time...
So we thought, it would be helpful to have a notice/link about this feature and then open it right away (with this link).
Maybe we will now just use a grafic without a link.
Except the problem above can be solved.

Thanks!

Best regards,
Thomas.
thschaer
 
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

Re: Link from content area to open search tab

Unread postby Tim Green » Mon May 15, 2017 1:52 pm

Hi Thomas,

Sorry about that, I probably sent it too quickly. You also need to add this onclick handler to it:

Code: Select all
<a href="hmftsearch.html" onclick="currentNav('search')" target="hmnavigation">Open Search</a>
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: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link from content area to open search tab

Unread postby thschaer » Mon May 15, 2017 2:09 pm

Hi Tim

Thanks – but unfortunately still the same problem/behavior...
Another idea?

Best,
Thomas.
thschaer
 
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

Re: Link from content area to open search tab

Unread postby Tim Green » Mon May 15, 2017 4:58 pm

thschaer wrote:Thanks – but unfortunately still the same problem/behavior...

Hmm... It's working fine here. Make sure that you are really using the HTML Code Object tool and add parent. to the onclick reference like this to make absolutely sure:


Code: Select all
<a href="hmftsearch.html" onclick="parent.currentNav('search')" target="hmnavigation">Open Search</a>

Also make sure that you are using the current version of Help+Manual 7. Some very early releases may have still used individual names for the TOC, Index and Search pages in the navigation pane instead of the standard pages used now. You can check your version with Help > About. The current version is 7.2.0 Build 4035. If you need to update you can download the latest installer from

http://www.helpandmanual.com/downloads.html?upd

Just install on top of your current version to update.This will not change any of your settings etc.
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: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link from content area to open search tab

Unread postby thschaer » Mon May 15, 2017 5:35 pm

Hi Tim

Thanks for your effort.
And SORRY – I made a mistake.
We're using a customized skin with an own name.
And that's based on the skin "Minimalist Plain White", not on "Flat Blue".
My mistake, I just found out while testing with different original skins without adaptions.
"Flat Blue" > code works nice, "Minimalist Plain White" > same problem as mentioned before.

Do you have a solution for a search link for this skin?

Thanks a lot!

& best regards,
Thomas.
thschaer
 
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

Re: Link from content area to open search tab

Unread postby Tim Green » Tue May 16, 2017 7:47 am

Hi Thomas,

"Minimalist Plain White" is a completely differnent V3 skin from the Premium Pack that uses a totally different kind of WebHelp called WebHelp 3.0. Absolutely nothing in it is in any way like the standard HM skins that I though you were referring to. Trying the methods from the standard skins there is like putting diesel in a petrol engine car... :twisted:

For these skins you need to use this code in your HTML code object:

Just switch to the search pane
Code: Select all
<a href="javascript:void(0)" onclick="hmWebHelp.switchNavTab('search');">Open Search</a>

Switch to the search pane and perform a search
Code: Select all
<a href="javascript:void(0)" onclick="hmWebHelp.switchNavTab('search');setTimeout(function(){xMessage.sendObject('hmsearch',{action: 'callfunction', fn: 'hmDoFtSearch', fa: 'test'})},300);">Open Search</a>

The only thing you should change here is the link text (Open Search) and the text to search for inside the single quotes in the fa: '' attribute. Leave everything else untouched.
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: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link from content area to open search tab

Unread postby thschaer » Tue May 16, 2017 8:31 am

Hi Tim

Works like a charm!
Thank you – and sorry again for the detour...

Best,
Thomas.
thschaer
 
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

Re: Link from content area to open search tab

Unread postby Paul Elbertse » Mon May 22, 2017 1:31 pm

Hi Tim,

I like this link very much.

What I would like to have is:
- a link to activate the TOC itself;
- a link to activate the Index Tab including a search;
- a link to activate the Seach Tab including a search;

I have tried some things but did not really work, just partially.

I am using 2 different skins:
V3 responsive skin: Flat_Slate_Blue.hmskin
V3 responsive skin: Minimalist_Standard.hmskin

If you have some time, could you help me with this?

Thanks in advance.

Regards,
Paul
Paul Elbertse
 
Posts: 260
Joined: Mon Sep 13, 2004 12:44 pm

Re: Link from content area to open search tab

Unread postby Tim Green » Mon May 22, 2017 5:21 pm

Hi Paul,

First of all, I would not really recommend putting links like this in your help. It is much better to let the users navigate the help themselves, and it adds unnecessary complexity to your pages. But be my guest:

The link to activate the search tab with a search is explained above so I don't need to repeat that here. As explained above, you must enter these links as HTML code objects, NOT as normal links.

To activate the TOC:
Code: Select all
<a href="javascript:void(0)" onclick="hmWebHelp.switchNavTab('contents');">Open Contents</a>


To activate the index tab:
Code: Select all
<a href="javascript:void(0)" onclick="hmWebHelp.switchNavTab('index');">Open Keyword Index</a>


To activate the index tab and search in the index:
Code: Select all
<a href="javascript:void(0)" onclick="hmWebHelp.switchNavTab('index');setTimeout(function(){xMessage.sendObject('hmindex',{action: 'callfunction', fn: 'hmDoKwSearch', fa: 'search term'})},300);">Open Index and Search</a>

Replace the text in 'search term' with the keyword you want to search for. If you have any problems with the search not being performed because the tab is not open in time, which might happen on slower servers, try increasing the 300 to a higher value. This is the delay in milliseconds that the script waits for the tab to be displayed before performing the search.
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: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link from content area to open search tab

Unread postby Paul Elbertse » Tue May 23, 2017 8:26 am

Hi Tim,

First of all, thanks.
Point taken. and you are right, of course.
In some of the topics I have, it is just a "service" to the customer where the subject covers multiple topics depending on the detail you are looking for.
Maybe even this way the user is pointed to the Search and/or Index tabs.

Regards,
Paul
Paul Elbertse
 
Posts: 260
Joined: Mon Sep 13, 2004 12:44 pm

Re: Link from content area to open search tab

Unread postby Tim Green » Tue May 23, 2017 10:18 am

Hi Paul,

Paul Elbertse wrote:In some of the topics I have, it is just a "service" to the customer where the subject covers multiple topics depending on the detail you are looking for.

Look at it this way: If you put those pre-defined search links in the topics you are cooking a fish and serving it. If you explain how to search you are getting your users to learn how to fish and cook for themselves, and to be active instead of passive. In the long run they will be happier that way, because they are empowered to find things for themselves, and it will be better for you because you will have fewer support requests. 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: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron