HTML Help (.chm) Script Error

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Mike Linacre
Posts: 96
Joined: Wed Apr 06, 2005 11:12 pm
Location: Chicago
Contact:

HTML Help (.chm) Script Error

Unread post by Mike Linacre » Fri Mar 13, 2020 10:50 am

Published the same project with HM7 and HM8.

HM7 success - I have published this same project many times

HM8 - published to HTML Help (.chm)

Launching the .chm file produces this:

Script Error
Line: 2
Char 29928
Error: Object doesn't support property or method 'addEventListener'
Code: 0
URL mk:@MSITStore: (my .chm path) :/jquery.js

Do you want to continue running scripts on this page?
Yes No

Ouch!

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

Re: HTML Help (.chm) Script Error

Unread post by Tim Green » Fri Mar 13, 2020 10:57 am

Hi Mike,

No ouch, you just haven't updated your HM8 installation. This is happening because you are using an older skin and Help+Manual is now including a newer version of the jQuery JavaScript framework with better security. Because of this, your skin needs to be "elevated" to use the current HTML and JavaScript rendering engine in CHM. The current build of HM8 does this automatically on publishing so you won't see the error. However, it is still a good idea to update your existing skins permanently.

Solutions:

1) Use one of the CHM skins included with Help+Manual 8
These all have the necessary elevation and will not cause this issue.

2) Edit the setting in your CHM skin to elevate it to the current version:

1. Open your .hmskin file in Help+Manual and in the Project Explorer on the left, navigate down to Configuration > HTML Page Templates > Default

2. Locate this line of code at the top of the template:

<IF_HTML><meta http-equiv="X-UA-Compatible" content="IE=edge" /></IF_HTML><IF_CHM>
<meta http-equiv="X-UA-Compatible" content="IE=8" /></IF_CHM>

It may look slightly different in your skin or may not be there at all. You need to delete both lines and replace them with just this single line, without any <IF_ tags around it:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

If the lines are not there at all, just enter this line directly after one of the other <meta... tags towards the top of the template code.

That will fix the problem.
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
Mike Linacre
Posts: 96
Joined: Wed Apr 06, 2005 11:12 pm
Location: Chicago
Contact:

Re: HTML Help (.chm) Script Error

Unread post by Mike Linacre » Fri Mar 20, 2020 10:20 am

Thanks Tim.

Adding this line to the Configuration Template did the job.
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

An easy fix :-)
and its backwards-compatible with HM7.

Post Reply