Clicking on search result opens a second browser tab – Zoom indexer

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Sonia Guimond
Posts: 79
Joined: Fri Oct 27, 2006 7:16 pm

Clicking on search result opens a second browser tab – Zoom indexer

Unread post by Sonia Guimond »

We are implementing a test project with Zoom indexer and Help & Manual.
I read the Zoom Full Version Instructions and followed the recommendations to set up the Zoom indexer configuration file. (Thanks, by the way for this document!)
Once the help is generated, if I do a full-text search, and then click on a search result, a second browser tab is opened showing the topic.
When the help was generated without the Zoom indexer configuration file, users would see the topic in the topic pane (on the right-hand side) when they clicked on a search result.
Question: If we use the Professional version of Zoom indexer and H&M, is there a way to prevent opening a second browser tab when users click on a search result? When users click on a search result, we would like them to see the corresponding topic in the topic pane.
I’m currently using the Free edition of Zoom indexer (version 8.0, build 1017) on a small H&M project. We’ll get the Professional version of Zoom indexer if this test project is conclusive.

Indexing mode = Offline mode (I let H&M do the indexing. I don’t index with Zoom.)

Platform = JavaScript
Search page configuration = Search form: Advanced. I chose Frame or window, and then entered hmcontent, as per the documentation. Is this correct with the skin I’m using?
Version of H&M = 8.4.3 build 5940
Generating the project with a skin “Boxed_Plain_Grey_WebHelp”.
Version of Premium Pack = 4.4.0
Still testing the test project locally.
Please let me know if you need extra information.
Regards,
Sonia Guimond
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Clicking on search result opens a second browser tab – Zoom indexer

Unread post by Tim Green »

Hi Sonia,

Update: This is a problem with version 8 of Zoom. HM and its skins are currently built for version 7, and its integrated version is also version 7. I'm looking into this, but a skin update will be required to work correctly with this version.

What I did discover, however, is that there is an error which can only occur in these skins in connection with the full version of Zoom 7 in its current version. I've sending you an updated search script file for the skin by email that will fix this error, but that only applies to version 7. I will have to analyze what the problem is in version 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: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Clicking on search result opens a second browser tab – Zoom indexer

Unread post by Tim Green »

Hi Sonia,

Update: I've now located what was happening with Zoom 8 and I've mailed you an updated version of the script for your skin, which will now work correctly with Zoom 8. Thanks for reporting this. 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.
Tim Frost
Posts: 320
Joined: Mon Nov 22, 2004 11:45 pm

Re: Clicking on search result opens a second browser tab – Zoom indexer

Unread post by Tim Frost »

I am using Zoom 8 Pro build 1017, with H&M build 5940 and a 4.4 skin, but clicking on a search result opens in the same tab when I test here. Do I need to be concerned about this issue?
Sonia Guimond
Posts: 79
Joined: Fri Oct 27, 2006 7:16 pm

Re: Clicking on search result opens a second browser tab – Zoom indexer

Unread post by Sonia Guimond »

Tim,

Thank you so much for the quick update. With the new .js file, I don’t open a second browser tab when I click on a search result.

Regards,
Sonia Guimond
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Clicking on search result opens a second browser tab – Zoom indexer

Unread post by Tim Green »

Tim Frost wrote: Fri Apr 22, 2022 7:23 pm I am using Zoom 8 Pro build 1017, with H&M build 5940 and a 4.4 skin, but clicking on a search result opens in the same tab when I test here. Do I need to be concerned about this issue?
I just checked this with the demo version of that Zoom 8 build and all the skins are affected, although I can imagine there could be situations where it doesn't happen. If you want to be sure right away you can apply the fix yourself as follows:

Edit the hm_searchscript.js file and locate the following lines of code:

Code: Select all

	// Handle normally if this is an external link
	var thisref = $(this).attr("href"), thatref = document.location.href;
	if (thisref.substr(0,2) != ".\/" && thisref.substr(0,thisref.lastIndexOf("\/")) !== thatref.substr(0,thatref.lastIndexOf("\/")))
	return;

	event.preventDefault();
	args = thisref.split("?");
	var gaquery = "";
	if (args[1].length > 0 && hmBrowser.server) {
		gaquery = "\?q" + args[1].substr(args[1].indexOf("\=")).replace(/\s/,"+");
		} 
	else if (args[1].length < 1) {
		args[1] = "";
		}
Replace with this (be careful to select and replace everything, all the way up to the last line containing the single } character, otherwise the search will just lock up):

Code: Select all

	// Handle normally if this is an external link
	var thisref = $(this).attr("href");
	if (/^https??:\/\//.test(thisref)) return;

	event.preventDefault();
	args = thisref.split("?");
	var gaquery = "";
	if (args[1] && args[1].length > 0 && hmBrowser.server) {
		gaquery = "\?q" + args[1].substr(args[1].indexOf("\=")).replace(/\s/,"+");
		} 
	else if (!args[1] || args[1].length < 1) {
		args[1] = "";
		}
The problem is that the new version of Zoom is formatting the links in the search results slightly differently, and this is tripping up the old version of the skin, so that it is identifying the links in the search results as external.

IMPORTANT: The file is set with build options NONE. Don't change that -- it shouldn't get exported, because it is merged into another file at publish time.
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.
Post Reply