WebHelp from application: open in the same browser window

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

WebHelp from application: open in the same browser window

Post by Andrew »

So, we have a Flex-based (and Silverlight-based) set of web applications. We are using WebHelp for help, and currently they are opening a completely new browser window each time a user clicks a CSH help button.

I think it would be much better, and much more professional, if the help would open in a single browser window, and each CSH icon clicked merely changes that one browser window's content, rather than opening up a whole new window.

Has anyone else figured out the correct way to do this? I'm pretty sure I could do it with JavaScript, but obviously, we are not developing with JavaScript.
Flare v6.1 | Capture 4.0.0
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: WebHelp from application: open in the same browser window

Post by NorthEast »

Is it not just a case of using a named window?

I don't know Flex/Silverlight, but in HTML you'd just use a named target window; e.g. if your link targets are "_blank" each will open in a new window, but if their targets are all "thingybob" they'll all open in the same thingybob window.
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: WebHelp from application: open in the same browser window

Post by i-tietz »

Andrew wrote:So, we have a Flex-based (and Silverlight-based) set of web applications. We are using WebHelp for help, and currently they are opening a completely new browser window each time a user clicks a CSH help button.

I think it would be much better, and much more professional, if the help would open in a single browser window, and each CSH icon clicked merely changes that one browser window's content, rather than opening up a whole new window.
Sure that's what you want? If the browser window is behind the current application window, it might stay there - means: The user might not notice teh browser loaded a new help. You will have to use javascript to change that. You need an onload function that sets the focus() on the named window.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: WebHelp from application: open in the same browser window

Post by Andrew »

Dave Lee wrote:Is it not just a case of using a named window?

I don't know Flex/Silverlight, but in HTML you'd just use a named target window; e.g. if your link targets are "_blank" each will open in a new window, but if their targets are all "thingybob" they'll all open in the same thingybob window.
Yes, that's how I'd do it in JavaScript, but our programmer said he didn't see that option available.
i-tietz wrote:Sure that's what you want? If the browser window is behind the current application window, it might stay there - means: The user might not notice teh browser loaded a new help. You will have to use javascript to change that. You need an onload function that sets the focus() on the named window.
I'm sure about the behavior I want, but I'm not necessarily sure how to get there. :) That's a valuable tip, and I can do an onload in Flare, I suspect. Thanks :)
Flare v6.1 | Capture 4.0.0
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: WebHelp from application: open in the same browser window

Post by i-tietz »

Andrew wrote:That's a valuable tip, and I can do an onload in Flare, I suspect. Thanks :)
You can insert Javascript sections into topics, templates and masterpages:

Code: Select all

 <script type="text/javascript">
            <!--
window.onload = PutNameHere.focus();
// -->
        </script>
This should do it ... if I'm not mistaken ...
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: WebHelp from application: open in the same browser window

Post by NorthEast »

Andrew wrote:Yes, that's how I'd do it in JavaScript, but our programmer said he didn't see that option available.

I've no idea if this is relevant, but a quick google for "flex url link" hints that you might be able to the same sort of thing.

If you definitely can't do it, then you're going to be a bit stuck really.
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: WebHelp from application: open in the same browser window

Post by i-tietz »

Never built a WebHelp, but for HTML Help the window name is the name of the skin.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: WebHelp from application: open in the same browser window

Post by Andrew »

i-tietz wrote:
Andrew wrote:That's a valuable tip, and I can do an onload in Flare, I suspect. Thanks :)
You can insert Javascript sections into topics, templates and masterpages:

Code: Select all

 <script type="text/javascript">
            <!--
window.onload = PutNameHere.focus();
// -->
        </script>
This should do it ... if I'm not mistaken ...
Thank you! That saves me the trouble of figuring out the code. :D
Flare v6.1 | Capture 4.0.0
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: WebHelp from application: open in the same browser window

Post by Andrew »

Quick update: looks like passing a name to the window (instead of, e.g., _blank) didn't work. Oh well. Thanks everyone!
Flare v6.1 | Capture 4.0.0
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: WebHelp from application: open in the same browser window

Post by Carsten Pedersen »

Hi,

I did not really find an answer here. I use C++ and call the WebHelp using a URL, like:

Code: Select all

www.myserver.com/webhelp/default_csh.htm#ID
where the ID is from my alias file.

This works, but it opens a new browser window every time. I would like the same browser window to be used
for all my context sensitive help calls. How to do that?

-cpede
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: WebHelp from application: open in the same browser window

Post by Carsten Pedersen »

Sorry to bump this.

But someone out there must have an answer for this. How do I force the context help to
re-use the already open browser window/pane ??

-cpede
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: WebHelp from application: open in the same browser window

Post by rob hollinger »

Here is a link to the help file:
http://webhelp.madcapsoftware.com/flare ... lopers.htm

WebHelp provides a few ways to perform Context Sensitive Help.

The two main ways are URL and JavaScript.
The easiest way is to execute a Javascript call using the provided function (FMCOpenHelp).
Application Developers can use lots of ways to execute these types of calls as well as create their own windows containing browser controls etc.
WebHelp does require its named window be one of two names: ("MCWebHelp" or "_MCWebHelpCSH"). Again, using the function (FMCOpenHelp) is the easiest way to make this happen.
If Developers need a better explanation of how the .js files work, Send them the "[YOURNAME].js" file that is generated in your webhelp output. In the comments section, it explains this function in more detail.

Here is an example HTML Page that uses the script call. Alter the numbers(IDs) to equal what you have set up in your project. Rename "default.js" to "your_webhelp_name.js". Drop it in your output folder, launch it and test. The Help provides explanation on the other fields.

Code: Select all

<html>
<head>
<title>Open</title>
<script type="text/javascript" src="default.js"></script>
</head>

<body style="font-family: Arial; font-size: 12px;">

<p>
<input type="button" value="Click Me" onclick="FMCOpenHelp(100, null, null, null);" /><br>
FMCOpenHelp(100, null, null, null);
</p>
<p>
<input type="button" value="Click Me" onclick="FMCOpenHelp(200, null, null, null);" /><br>
FMCOpenHelp('200', null, null, null)
</p>
<p>
<input type="button" value="Click Me" onclick="FMCOpenHelp(300, null, null, null);" /><br>
FMCOpenHelp('300', null, null, null)
</p>
</body>
</html>
Rob Hollinger
MadCap Software
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: WebHelp from application: open in the same browser window

Post by Carsten Pedersen »

Thanks for the answer.

I have of cause read the help file and found the section you mention. My problem is that, yes it is mentioning two methods;
the jscript and the URL. Since I try to call my context sensitive help from a C++ program, it is not easy to call a
jscript method (as far as I know). All the samples call WebHelp from a Web page, which is good for web developers but not for
application developers who what to call the help from a C++, C# or other language.

So please tell me how to call a jscript from a C++ program, or tell me how to do this using a URL notation.
And I know someone knows the answer to this problem since the CSH API Tester in Flare works, and this is probably called
from C# code.



Actually I generally think that the MadCap guys should spend some time thinking about who uses Flare. I slowly can see
a pattern where they are using it in another way:

1) In v4 and v5 the skins did not work for HTMLHelp outputs. This meant that we could only uses the default look and one
window in out output. The xxx.chm>MySkin did not work.
2) Flare still only makes #defines in a header file, even everybody knows (especially the MadCap guys) that C# and do
not have #defines, but prefers enums. This prevents application developers from using the alias directly, but have to
convert he defines themselves.
3) And now this where only one example shows that you can call a URL to show the WebHelp, but no way to control the
browser windows.

-cpede
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: WebHelp from application: open in the same browser window

Post by rob hollinger »

Carsten,
Answers to the 3 questions.
1. Not sure what your asking for. There is only so much that can happen in HTML Help in the way of skins. We are conforming to Microsofts standards for HTML Help.
2. Sent a feature request to add a C# header file. (work around would be to use find and replace on the file to remove #define text.)
3. We generally avoid giving advice on how to code an application because there are several ways in several langauges dealing with several outputs.

Here is something I found on MSDN on how to call the default browser and pass it a URL.
http://support.microsoft.com/kb/224816
Rob Hollinger
MadCap Software
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: WebHelp from application: open in the same browser window

Post by Carsten Pedersen »

Hi,

1. I'm not asking for anything here since you corrected the bug in v6. My point was that it required 6 versions before you discovered that HTMLHelp could not use skins; it was only working for WebHelp etc. And HTMLHelp is primarily used by application developers, I believe.
2. That would be fine. We actually already do this (and I guess all others).
3. But wait a second. You generate a nice JScript file with sample code for linking to the WebHelp for Web developers, and give tons of samples on how to do this in the help, and uses one line for saying; by the way you can also use an URL.

I think that there is a gab between you and the application developers using Flare. And by application developers I mean programmers making client programs for e.g. Windows.

So, my simple question is: How do I call WebHelp so that I can reuse the browser window from a Win32/C++ program. Just like the JScript does for Web developers, and how your CSH Tester does inside Flare?

-cpede
Christine
Propeller Head
Posts: 10
Joined: Wed Jan 18, 2006 12:31 am
Location: Ottobrunn, Germany
Contact:

Re: WebHelp from application: open in the same browser window

Post by Christine »

Hi,
is anybody out there with an answer?
Carsten, could you solve this problem in the meantime? And, if Yes, how?

We have exactly the same problem:
A GUI coded in Tcl/tk and a locally installed WebHelp. We have to use WebHelp, because the application is to run on Windows and Linux systems.
At the moment a new browser window is opened each time contextsensitive help is called.
How is the WebHelp to be called so that the Browser window is reused?

Regards
Christine
Christine Platz
cognitas. GmbH
http://www.cognitas.de
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: WebHelp from application: open in the same browser window

Post by Carsten Pedersen »

No unfortunately not.

And I can add, that our customers are very frustrated about this, since the WebHelp is a nice and flexible thing.

I still believe that the MadCap staff should spend some time trying to integrate the results (help files, HTML, WebHelp etc.) in various solutions,
like C++, C#, Tcl/tk, and so on. Just to find how useful - or not - it is.

-cpede
Post Reply