View previous topic :: View next topic |
Author |
Message |
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Tue May 15, 2007 11:41 am Post subject: Hypertext - %ht |
|
|
I am using %ht to display help text relating to a particular screen - the .HTM file contains text relating to various screens and I wish, on entry, to jump to the part relating to that screen.
The call I use from 'screen 6' is:
integer*4 function help_func()
c
INCLUDE <WINDOWS.INS>
c
integer*4 ii
ii = winio@('%pv%60.20ht[SIX]')
help_func = 1L
end
If SIX does not exist in the .HTM I get an error on running. When SIX does exist then all works fine BUT the file display still opens up at the start - not at SIX.
Section of .HTM file given below.
Any assistance would be appreciated.
Thanks, Bill
<DOC name="ONE">
On Screen One you enter details of the problem to be solved...
Lots of text....
<DOC name="SIX">
<h1>Packing Options</h1>
On Screen 6 you enter details of Packing Options (lots of text) |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue May 15, 2007 12:39 pm Post subject: |
|
|
On the face of it I cannot see anything wrong with your outline.
If you want to construct a very short working sample then I will attempt to step through it to find out what is going wrong. You can post your sample here including both your source file and your html file. |
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Tue May 15, 2007 5:34 pm Post subject: %HT CODE as tried: |
|
|
Thanks Paul - Code below -
Program -
winapp 50000,50000,'paul.rc'
OPTIONS(INTL)
OPTIONS(LOGL)
implicit none
INCLUDE <WINDOWS.INS>
external back_func,help_func
integer*4 ii,icntrl
call add_hypertext_resource@('help')
ii=winio@('%ww[maximise,no_minbox,fixed_size]&')
ii=winio@('%mn[&Help]&',help_func)
ii=winio@('%nl%cn%14^bt[&Exit]&',back_func)
ii=winio@('%lw',icntrl)
call yield_program_control@(y_temporarily)
end
integer*4 function back_func()
include <windows.ins>
back_func = 0L
end
c
integer*4 function help_func()
INCLUDE <WINDOWS.INS>
integer*4 ii
ii = winio@('%`bg[white]%pv%60.20ht[SIX]')
help_func = 1L
end
Resource (paul.rc):
help HYPERTEXT "cargohlp.htm"
HTM file (cargohlp.htm)
<HTML>
<TITLE> CARGOMANAGER HELP </TITLE>
<DOC name="ONE">
This is info on Screen One <p>
This program is written using ClearWin+ and is available as a sample
program. By browsing the text which follows you can explore many of the
features of ClearWin+ (especially some new features, not yet found in the
manual) simply by clicking on highlighted text describing items of
interest to you. Some of the icons and bitmaps also respond to a click.<red>
Please note that the use of this program is no substitute for reading the
manual</red> - it is designed to give you a taste of what is possible using
ClearWin+. <p>
This program is written using ClearWin+ and is available as a sample
program. By browsing the text which follows you can explore many of the
features of ClearWin+ (especially some new features, not yet found in the
manual) simply by clicking on highlighted text describing items of
interest to you. Some of the icons and bitmaps also respond to a click.<red>
Please note that the use of this program is no substitute for reading the
manual</red> - it is designed to give you a taste of what is possible using
ClearWin+. <p>
<DOC name="SIX">
<h1>Packing Options</h1>
This is info on Screen 6.
Please Note: In addition to using this help system the FULL MANUAL contains a full search / history mechanism.
The Help option contents on each screen focus on information of immediate relevance to the interpretation of the screen.
</HTML> |
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Tue May 15, 2007 8:22 pm Post subject: |
|
|
Hi Bill,
I think that your html is missing a </HTML> and <HTML>
At the end of "one" you need a </HTML> and new <HTML> before "six"
as follows:-
.
.
.
manual</red> - it is designed to give you a taste of what is possible using
ClearWin+. <p>
</HTML>
<HTML>
<DOC name="SIX">
<h1>Packing Options</h1>
This is info on Screen 6.
.
.
.
I hope this helps.
John |
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Wed May 16, 2007 8:44 am Post subject: %ht problem. |
|
|
Dear John (and Paul),
Many thanks indeed for pointing out the error - the manual does state this quite clearly but I had assumed the DOC command alone was sufficient. Your solutions does, of course, solve the problem.
Most grateful for your assistance -
FYI - I am having to replace local help screens (originally .hlp) in an application - as a result of Vista not supporting them. As I already provide a fully searchable manual (compiled HTML) and the help screens are short and discuss just a single screen, the use of the Hypertext Window provides a simple solution.
Bill |
|
Back to top |
|
|
|