Problem opening WebHelp from code

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
adlangx
Propeller Head
Posts: 14
Joined: Tue Oct 06, 2009 12:46 pm

Problem opening WebHelp from code

Post by adlangx »

I am currently trying to run web help from VB code. To bring up the browser I am using:

Process.Start(FileLocation.htm#HelpID)

This brings up the browser, but only to the opening page, not the topic ID that I passed in.

If I copy the path directly into a browser it works perfectly.

Somehow the ID is getting removed or ignored when launching form code.

Any Ideas?
adlangx
Propeller Head
Posts: 14
Joined: Tue Oct 06, 2009 12:46 pm

Re: Problem opening WebHelp from code

Post by adlangx »

After some research I have found the following:

If the files are on a web server and are accessed via a website the id's work correctly to find the help.

You cannot access a topic using an ID locally even when using a shortcut or running from the Start menu.


This leads me to conclude that you need a web server running to properly navigate directly to a help file using the ID#. Directly accessing the file locally does not work.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Problem opening WebHelp from code

Post by NorthEast »

Well, I'm not familiar with VB and don't understand what that bit of code does.

You can definitely open a local WebHelp system using a CSH identifier - using the URL format YourHelp_CSH.htm#helpID
(Note that you need to use the ..._CSH.htm file for CSH calls.)

If you try the URL to your local help in a browser, does that not work?
If it does it would suggest the problem may be the VB code.
adlangx
Propeller Head
Posts: 14
Joined: Tue Oct 06, 2009 12:46 pm

Re: Problem opening WebHelp from code

Post by adlangx »

It works if you enter the URL directly in the browser.

If you try to make a desktop shortcut or enter that URL directly in the Run line in the start menu it does not work. Both of those Windows methods use Process.Start(URL) to open the browser. Madcap, apparently, does not support that method. It should, but it does not.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Problem opening WebHelp from code

Post by KevinDAmery »

adlangx wrote:It works if you enter the URL directly in the browser.

If you try to make a desktop shortcut or enter that URL directly in the Run line in the start menu it does not work. Both of those Windows methods use Process.Start(URL) to open the browser. Madcap, apparently, does not support that method. It should, but it does not.
Hang on - if it does not work from a desktop short cut or the Run line as you say, wouldn't that point to a problem with the system as a whole rather than Flare's output? All it's doing is creating an html file with a frameset and some javascript, so there isn't really anything Madcap could be doing that would break those methods.

To confirm, try opening a non-Flare html file using either of those methods on the same system. If they don't work either, it's not Flare's fault.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Problem opening WebHelp from code

Post by LTinker68 »

I agree with Kevin.

If I type http://kb.madcapsoftware.com/default_CSH.htm#CSH1005F into a browser, it goes to a page on MadCap's knowledgebase site.

If I go to Start > Run and type that same text, it works (launches a browser and goes to that page).

If I create a shortcut on the desktop and type that same text, it still works.

So as long as your method passes the URL correctly, then it should work.

That said... Are you calling help hosted on your web server, or is the help running on from a location on the user's computer? If it's on a web server, does your call include the http:// in the URL?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Problem opening WebHelp from code

Post by NorthEast »

I did a quick test on this, and if you put any file URL in the run box that includes a # parameter (e.g. I tried a link to a bookmark in a local htm file), then the # parameter appears not to be passed to the browser - i.e. the URL is truncated after the filename.

It only appears to pass the # parameter in http URLs, not file URLs.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Problem opening WebHelp from code

Post by LTinker68 »

That's why I was asking where the file was running from -- I didn't have a good one here that I could test a CSH call to a file store.

So is that a Flare issue or a Windows issue? (Of course, if he's outputting WebHelp there's no guarantee that his users are running the help on a Windows machine, so I'm playing to the averages with that question.)
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Problem opening WebHelp from code

Post by NorthEast »

It's not WebHelp specific, any file URL containing a # parameter that I entered in the Run box didn't work. The # parameter doesn't appear to be passed to the browser location bar. (I used quotes, and every variation I could think of.)

However, I tried setting up a shortcut to a WebHelp project with a CSH identifier, and that does work.
The link is in the format file:///C:/..../Default_CSH.htm#identifier, and it works no problem.
adlangx
Propeller Head
Posts: 14
Joined: Tue Oct 06, 2009 12:46 pm

Re: Problem opening WebHelp from code

Post by adlangx »

LTinker68 wrote:That's why I was asking where the file was running from -- I didn't have a good one here that I could test a CSH call to a file store.

So is that a Flare issue or a Windows issue? (Of course, if he's outputting WebHelp there's no guarantee that his users are running the help on a Windows machine, so I'm playing to the averages with that question.)

I am attempting to run the project locally. All the files are on the users machine.

I have tried every string variation I can think of when attempting to launch the browser to a CSH using Process.Start("Path").
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Problem opening WebHelp from code

Post by NorthEast »

adlangx wrote:I have tried every string variation I can think of when attempting to launch the browser to a CSH using Process.Start("Path").
So, can that process handle a # parameter as part of the path?

If you're not sure, I'd try it using a link to a non-Flare html file, like a file containing a bookmark.
For example, if you have a ordinary htm file containing a bookmark (e.g. a tag <a name="test" />), then set up the path to the file including the bookmark (e.g. ...file.htm#test). If you run the process, does the browser open the topic at the bookmark, and does the location bar include the full path including the # parameter? If it doesn't, then you know it's the process that's the problem.
le_sloth
Propeller Head
Posts: 21
Joined: Sun May 20, 2007 11:16 pm

Re: Problem opening WebHelp from code

Post by le_sloth »

Hi

Did you ever manage to resolve this issue? Having exactly the same problem here!

thanks
---
Using Flare 7.0
Post Reply