Open CSH in same window

This forum is for all Flare issues not related to any of the other categories.
Post Reply
SharcSL
Propeller Head
Posts: 27
Joined: Thu Oct 04, 2012 2:26 pm

Open CSH in same window

Post by SharcSL »

Hello,
We have a lot of CSH in our product in the form of field and page help topics.
As I was testing our CSH help links from our product, I found that each time I opened a CSH topic, it would open in a new window, rather than in the same window.

Is there a way to open each CSH help topic in the same window when another topic is already open?

We are using Flare 9.1.1 to create our WebHelp.

We are not using an alias file.
We map the help topics in a .cs file.
We apply a field or page help skin to the topics as shown in the sample paths below. I'm including the paths because I'm wondering there's something that I have to add to every path to specify open in the same window.

public const string TO_BASIC_FILEA = "Filename_A/Filename_A_CSH.htm#PathA/PathAB/Filename_Is_Long_for_A.htm|FieldHelp_Skin"

public const string Review_FILEB_PATh= "Filename_A/Filename_A_CSH.htm#PathA/PathAB/PageHelp/ThisIsaPageHelpFile.htm|PageHelp_Skin"


Thank you,

SharcSL
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Open CSH in same window

Post by RamonS »

Yes, you need to give the window a name and use the name for subsequent calls. If you use a simple a link you need to set the target attribute, see here: http://www.htmlcodetutorial.com/linking/_A_TARGET.html
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Open CSH in same window

Post by NorthEast »

For WebHelp, you must use the target name "MCWebHelp" to re-use the same window.

This is because if you use any other name (or _blank), the WebHelp output will actually rename the window to MCWebHelp.

(I reported this as a bug about 4 years ago.)
JohnB
Propeller Head
Posts: 50
Joined: Mon Nov 09, 2009 12:17 pm

Re: Open CSH in same window

Post by JohnB »

Hi -

I was told recently by Support that the need for the parameter target=”MCWebHelp” was fixed for Flare 8, and that we could remove this parameter from our code. "There should not be a difference in behavior."

If you search the Flare 8 or 9 Help for "MCWebHelp," I think you will see it's no longer mentioned, which is what prompted my question about it.

We haven't done anything yet based on this information, but I'd be interested to know if there are still issues.
SharcSL
Propeller Head
Posts: 27
Joined: Thu Oct 04, 2012 2:26 pm

Re: Open CSH in same window

Post by SharcSL »

Hello,
Thank you for the pointer to the information about targets.
I'm not clear on where I would name the window in Flare, nor how I would modify the path to include the window/target name.

Our paths are like the following:
Filename_A/Filename_A_CSH.htm#PathA/PathAB/Filename_Is_Long_for_A.htm|FieldHelp_Skin

The path translates into a URL like the following:
https://servername/filename_A/Filename_ ... dHelp_Skin

Where in this path would I specify the target?

Thank you,
SharcSL
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Open CSH in same window

Post by RamonS »

You do not name the window in Flare, but within the help call in the application. If you are using simple a links the window name goes into the target property. For your example that would be like this:

Code: Select all

<a href="https://servername/filename_A/Filename_A_CSH.htm#PathA/PathAB/Filename_Is_Long_for_A.htm|FieldHelp_Skin" target="MCWebHelp">Click here for help</a> 
The name for the help window can be anything as long as you keep using the same name for each subsequent call. Since the name doesn't matter you might as well use "MCWebHelp" and be safe. In modern browsers this link is likely opening in a new tab. If you want to force a new window then you might have more control using JavaScript.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Open CSH in same window

Post by NorthEast »

JohnB wrote:I was told recently by Support that the need for the parameter target=”MCWebHelp” was fixed for Flare 8, and that we could remove this parameter from our code. "There should not be a difference in behavior."

If you search the Flare 8 or 9 Help for "MCWebHelp," I think you will see it's no longer mentioned, which is what prompted my question about it.
Yep, sorry, it looks like they have fixed it now. I reported it as a bug in v7, and never got confirmation that it was fixed.

(I don't think it was ever documented in the help; I'd only seen the workaround in the forums.)
SharcSL
Propeller Head
Posts: 27
Joined: Thu Oct 04, 2012 2:26 pm

Re: Open CSH in same window

Post by SharcSL »

Thank you for your help. We can't use a hrefs in our .cs file, but our dev is trying something else.

SharcSL
Post Reply