Popups within popups

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
JasonSTI
Sr. Propeller Head
Posts: 110
Joined: Mon Jan 07, 2008 11:34 am

Popups within popups

Post by JasonSTI »

I'm encountering an issue with popups that I'm hoping can be corrected. In our previous Help (.hlp) project, we had some topics that called other topics as popup. Many of these can be opened as a base topic, or as a popup itself. If they were a popup, those new topics would replace the existing popup. However, in CHM, that is not the case and we are getting nested popups.

Is there a way to make the popup links close any existing popup window before opening the new window? I realize we would lose any browse history for the popup window, but that is ok for our project.

Thanks for the help!
JasonSTI
Sr. Propeller Head
Posts: 110
Joined: Mon Jan 07, 2008 11:34 am

Re: Popups within popups

Post by JasonSTI »

Ok, I've investigated this quite a bit. It appears that the only way this is going to work is using some frame detection method to determine if the calling document is the top document or not. The problem being, that using target=_Popup automatically inserts Flare's popup javascript call. In order to do the detection, we would have to either edit that javascript, or route to in from another javascript function.

Is it possible to edit Flare's Popup javascript for a project (or even globally) before it is inserted? At the moment, the only way I can see it is to compile our output, edit each file in the Output folder (/shudder/) and recompile it using HTML Help Workshop. This is hardly ideal. Is it possible to insert a call to the Flare java from our own detection function? I'm just not seeing how (although I'm fairly new to javascript, so that may be my fault).

Anyone have an idea of where to go from here?
Doug Eaton
Propeller Head
Posts: 68
Joined: Tue Feb 19, 2008 9:47 am

Re: Popups within popups

Post by Doug Eaton »

My workaround was to edit the hyperlink so that the target frame is "same window" instead of "popup" when the original popup topic contained other popups or related topics.
Post Reply