Script error when clicking links

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Script error when clicking links

Post by Brit »

I am using Flare version 2.5 and compiling HTML help. Recently I noticed that some of the links (cross references as well) in files cause the following message (error), sometimes several links in one file:

"An error has occurred in the script on this page."

I have got two projects for two languages which behave the same (same file > same error). The line, row, ... in the error always reference to the same element/number which is strange. Some of the errors I could eliminate by removing the cross reference and replace it with a usual link. Some still resist whatever I do... There are some links in snippets that cause errors. Sometimes when I remove them, it is ok with the others, even when I change the order of links (or text with links). Isn't it strange? I cannot find a structure or reason for that.

Did anyone else experienced anything like that? Or is it simply a bug and I need to upgrade...?
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Re: Script error when clicking links

Post by Brit »

Hmm, I found a possible solution: I have some files with links to files that open in a pop-up window. The pop-up function might be the problem. When I change to default window to open in, the error disappears. This seems to me like a bug. Does anyone know if it is fixed in version 3.1?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Script error when clicking links

Post by LTinker68 »

How are you calling the popup window? Did you create a hyperlink in Flare and tell it the target was a Popup Window, or is there some legacy code (e.g., Javascript) that's being used to create a custom sized window. Is this a legacy project from RoboHelp?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Re: Script error when clicking links

Post by Brit »

I create hyperlinks with target calling "popup window". In fact the project came from RoboHelp before. The links have been added later on. There is no Script tag in the code. The error appears inconsistently. It seems to me like a bug, says a developer in my office. Sometimes a link causes an error, after clicking somewhere else, the error for that link is gone... The errors move in the file, when I add the same link again, the other one works...
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Script error when clicking links

Post by LTinker68 »

Hmmm, I don't build HTML Help and haven't in years, so I'm out of suggestions. There is a patch available on the Flare KB regarding HTML Help and popup windows, but that's for Flare v3.1 and you said you're using 2.5, so it shouldn't apply to you.

The only other thing I can think to try is to create a brand new project from scratch, create some dummy topics, and see if you can recreate the issue. If the problem occurs in the new project's output, then there could be something about that version of Flare. If it doesn't occur, then there's something in the project that's causing a problem, most like something that came along from the RH import.

Other than that, I have nothing else to suggest. Hopefully someone else will chime in with more suggestions. I'm guessing you don't have a maintenance plan since you didn't upgrade to v3.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Re: Script error when clicking links

Post by Brit »

Thank you very much for writing. I ordered a 3.1 version of Flare, let's see what happens next...

I think it is a special combination of elements in the file (text, togglers, drop-downs, links, a.s.o) that causes that Script error in my version. When I create a new project with the same file imported it happens as well.

I'll give a feedback about the project in version 3.1. Hopefully I will be lucky and it works then... You said a patch for 3.1 is available? Where can I find it?
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Re: Script error when clicking links

Post by helen »

http://kb.madcapsoftware.com/ :)

Flare > Patches > Flare 3.1

Good luck!
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Re: Script error when clicking links

Post by Brit »

So, version 3.1 is installed and the same message appears. I checked the old project from RoboHelp after importing into Flare > the message existed from the beginning. So it must be caused by RoboHelp.
There is a logic when clicking popup links that cause that error. For example the first two popup links cause an error when clicking them. When I click the last one in file instead and after that the second one in the file, the popup for the second one will open in the frame of the last one. So there must be a connection between these two links... Strange...
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Script error when clicking links

Post by LTinker68 »

Is your RH code calling to a window by name, like "main"?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Re: Script error when clicking links

Post by Brit »

No, there is no "main" window in the source code.

But I compared the two chm source codes (RH + Flare) of the same file the problem occurs. In the RH file I found a kind of index numbering such as >>kadovFilePopupInit('a5')<< and the appropriate id (id=a5). The order is as follows from the beginning of the file to the end: id=4, id=5, id=2, id=3.
In Flare after import the pop-ups are named by tag "name" (name="popup1") in order 1 to 4 from text beginning to end. May that be the reason?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Script error when clicking links

Post by LTinker68 »

What are you trying to link to, or rather, reveal in the popup window? Text or another topic?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Brit
Propeller Head
Posts: 12
Joined: Thu Sep 20, 2007 7:00 am

Re: Script error when clicking links

Post by Brit »

I link to other files that have different master pages such as normal and pop-up. They open in a separate window that I specify when entering the link.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Script error when clicking links

Post by LTinker68 »

I do the same type of thing to display information off an image map. The masterpage of the topic being called references a custom <html> tag that specifies the width/height of the window of the popup. When I do that, I make sure that I don't specify a class in the hyperlink window, because that specified the class for the <a> tag. The popup class is a sub-class of the <a> tag in the stylesheet and you can specify height/width for that, and that will set the height/width of the popup window. I didn't use that option, because A) it only works with text hyperlinks and not image map hyperlinks, and B) there are other options available that can be set through the <html> tag.

If you create a hyperlink to a topic that has its own masterpage and custom <html> tag, and you specify that the hyperlink is to open in a popup window, and you specify the popup class for the hyperlink, then maybe that's what's causing the problem. I'm not sure who would win the tug-of-war between the popup class and the custom html class.

Did you also try linking to a topic that has no masterpage or a different masterpage -- maybe there's a problem in the masterpage of the topics you're trying to popup.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply