Lucy_H

I have a compiled help file and on of the help files I have headings that can be clicked on to show the information under the heading. At the top of the file I also have a link called "Show All". This shows all hidden information under the headings and the link changes to "Hide All". This link then hides all information again when clicked. I also have images with these links. These images are just simple arrows.

When "Show All" or any of the headings are clicked, the images dissapear. Here is my code the the "Show All" link and the first heading:

<P id="ExpandAllLine" class="ExpFav"><A class=DropDown onclick=ShowAll() href="#"><IMG id=picHeader height=7 src="../IMAGES/showall.gif" width=10 border=0 ><SPAN id="ShowAll">Show All</SPAN></A></P>

<P><A class=DropDown onclick=Hide() href="#"><IMG height=10 src="../IMAGES/Contracted.gif" width=14 border=0 >Start Page</A></P><DIV id="ExpCol" class="collapsed" border="0">

Why do these images disapear

Lucy



Re: Developer Documentation and Help System HTML Help - Show All and Hide All

EWoodruff

Checked the script for the ShowAll() and Hide() functions. They are probably substituting a new image that isn't present in the help project. You could probably confirm this by clicking the links again to reverse the operation as the images will most likely change back to reflect the original state again and will show the images that are there.

Eric





Re: Developer Documentation and Help System HTML Help - Show All and Hide All

Lucy_H

I have finally solved my problem. It was actually a simple solution but I'm not sure exactly why it works. All I have done is added the image I want to show when "Show All" is clicked into any HTML file in my project and set its visibility to hidden. All HTML pages now work prefectly.

Lucy





Re: Developer Documentation and Help System HTML Help - Show All and Hide All

Dave Sexton

Hi Lucy,

Assuming that you're referring to Help 1.x (.chm), the Html Help Workshop compiler will automatically include images in your HTML that are referenced using <img/> tags, however, it's not going to include images that are referenced in JavaScript. By adding the reference to your image in HTML (using <img/>) you have enabled the compiler to find the image and include it automatically.

An alternative to using a hidden <img/> tag is to explicitly tell the compiler to include the image even if it's not referenced in HTML. To do this open your project file (.hhp) in notepad and add your image to the [FILES] option. For example:

TEST.hhp
[OPTIONS]
Compatibility=1.1 or later
Compiled file=TEST.chm
Contents file=TEST.hhc
Index file=TEST.hhk
Default Topic=html/default.htm
Full-text search=Yes
Language=0x409 English (United States)
[FILES]
images\showall.gif
topics\*.htm

- Dave






Re: Developer Documentation and Help System HTML Help - Show All and Hide All

Lucy_H

Hi Dave

Yes I was referring to Help 1.x (.chm). That is what I have now done. I have referenced my image in HTML using the <img> tag. Now I understand why it is including the image. Thank you.

Thank you also for the alternative you suggested. This has given me something new to learn and to experiment with.

Thank you for the help and advice it has really helped my learning.

Lucy





Re: Developer Documentation and Help System HTML Help - Show All and Hide All

Dave Sexton

Hi Lucy,

NP. You can find more info on the Help MVP's wiki:

http://www.mshelpwiki.com/wiki/tiki-index.php page=HTMLHelp

- Dave